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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Yc3G5KnDYxg2PfvP@rowland.harvard.edu>
Date:   Thu, 30 Dec 2021 09:49:08 -0500
From:   Alan Stern <stern@...land.harvard.edu>
To:     cgel.zte@...il.com
Cc:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        linux-usb@...r.kernel.org, usb-storage@...ts.one-eyed-alien.net,
        linux-kernel@...r.kernel.org, luo penghao <luo.penghao@....com.cn>,
        Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH linux] usb-storage: Remove redundant assignments

On Thu, Dec 30, 2021 at 06:38:19AM +0000, cgel.zte@...il.com wrote:
> From: luo penghao <luo.penghao@....com.cn>
> 
> The assignments in these two places will be overwritten, so they
> should be deleted.
> 
> The clang_analyzer complains as follows:
> 
> drivers/usb/storage/sierra_ms.c:
> 
> Value stored to 'retries' is never read
> Value stored to 'result' is never read
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: luo penghao <luo.penghao@....com.cn>
> ---

Acked-by: Alan Stern <stern@...land.harvard.edu>

>  drivers/usb/storage/sierra_ms.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/storage/sierra_ms.c b/drivers/usb/storage/sierra_ms.c
> index b9f78ef..0774ba2 100644
> --- a/drivers/usb/storage/sierra_ms.c
> +++ b/drivers/usb/storage/sierra_ms.c
> @@ -130,8 +130,6 @@ int sierra_ms_init(struct us_data *us)
>  	struct swoc_info *swocInfo;
>  	struct usb_device *udev;
>  
> -	retries = 3;
> -	result = 0;
>  	udev = us->pusb_dev;
>  
>  	/* Force Modem mode */
> -- 
> 2.15.2
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ