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] [thread-next>] [day] [month] [year] [list]
Message-ID: <7544eca5-bbca-06eb-462e-fca036fe1beb@embeddedor.com>
Date:   Wed, 8 Aug 2018 21:28:53 -0500
From:   "Gustavo A. R. Silva" <gustavo@...eddedor.com>
To:     zhong jiang <zhongjiang@...wei.com>, davem@...emloft.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers/net/usb/r8152: remove the unneeded variable "ret"
 in rtl8152_system_suspend

Hi Zhong,

On 8/8/18 8:39 PM, zhong jiang wrote:
> rtl8152_system_suspend defines the variable "ret", but it is not modified
> after initialization. So just remove it.
> 

Thanks for working on this.

I wonder if you are using any tool like Coccinelle to spot these sort
of issues. If so, it'd be nice to mention that in the changelog.

The above is important for two reasons, one is to give credit to the people
behind such tools, and the second one is to add support for metrics collection.

Thanks
--
Gustavo


> Signed-off-by: zhong jiang <zhongjiang@...wei.com>
> ---
>  drivers/net/usb/r8152.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/usb/r8152.c b/drivers/net/usb/r8152.c
> index 124211a..9774270 100644
> --- a/drivers/net/usb/r8152.c
> +++ b/drivers/net/usb/r8152.c
> @@ -4415,7 +4415,6 @@ static int rtl8152_runtime_suspend(struct r8152 *tp)
>  static int rtl8152_system_suspend(struct r8152 *tp)
>  {
>  	struct net_device *netdev = tp->netdev;
> -	int ret = 0;
>  
>  	netif_device_detach(netdev);
>  
> @@ -4430,7 +4429,7 @@ static int rtl8152_system_suspend(struct r8152 *tp)
>  		napi_enable(napi);
>  	}
>  
> -	return ret;
> +	return 0;
>  }
>  
>  static int rtl8152_suspend(struct usb_interface *intf, pm_message_t message)
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ