lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <01ae2244-99cd-e96d-1bb7-6082da017cc8@collabora.com>
Date:   Tue, 4 Oct 2022 16:09:55 +0500
From:   Muhammad Usama Anjum <usama.anjum@...labora.com>
To:     Mark Brown <broonie@...nel.org>
Cc:     usama.anjum@...labora.com, kernel@...labora.com,
        kernel-janitors@...r.kernel.org, linux-spi@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] spi: Remove the dead code

Please disregard this patch. This is wrong and not needed.

On 10/4/22 10:56 AM, Muhammad Usama Anjum wrote:
> The vmallocated_buf is being checked if it is true inside the body of a
> if condition which has already checked if it is true. Remove the
> duplication and dead code as a result.
> 
> Signed-off-by: Muhammad Usama Anjum <usama.anjum@...labora.com>
> ---
>  drivers/spi/spi.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
> index 44e4352d948b..4c51cd4e4ab0 100644
> --- a/drivers/spi/spi.c
> +++ b/drivers/spi/spi.c
> @@ -1057,10 +1057,7 @@ static int spi_map_buf_attrs(struct spi_controller *ctlr, struct device *dev,
>  			min = min_t(size_t, desc_len,
>  				    min_t(size_t, len,
>  					  PAGE_SIZE - offset_in_page(buf)));
> -			if (vmalloced_buf)
> -				vm_page = vmalloc_to_page(buf);
> -			else
> -				vm_page = kmap_to_page(buf);
> +			vm_page = vmalloc_to_page(buf);
>  			if (!vm_page) {
>  				sg_free_table(sgt);
>  				return -ENOMEM;

-- 
Muhammad Usama Anjum

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ