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: <20200106131329.GH22387@unicorn.suse.cz>
Date:   Mon, 6 Jan 2020 14:13:29 +0100
From:   Michal Kubecek <mkubecek@...e.cz>
To:     netdev@...r.kernel.org
Cc:     yu kuai <yukuai3@...wei.com>, klassert@...nel.org,
        davem@...emloft.net, hkallweit1@...il.com,
        jakub.kicinski@...ronome.com, hslester96@...il.com, mst@...hat.com,
        yang.wei9@....com.cn, willy@...radead.org, yi.zhang@...wei.com,
        zhengbin13@...wei.com
Subject: Re: [PATCH V2] net: 3com: 3c59x: remove set but not used variable
 'mii_reg1'

On Mon, Jan 06, 2020 at 08:53:37PM +0800, yu kuai wrote:
> Fixes gcc '-Wunused-but-set-variable' warning:
> 
> drivers/net/ethernet/3com/3c59x.c: In function ‘vortex_up’:
> drivers/net/ethernet/3com/3c59x.c:1551:9: warning: variable
> ‘mii_reg1’ set but not used [-Wunused-but-set-variable]
> 
> It is never used, and so can be removed.
> 
> Signed-off-by: yu kuai <yukuai3@...wei.com>
> ---
> changes in V2
> -The read might have side effects, don't remove it.
[...]
> @@ -1605,7 +1605,6 @@ vortex_up(struct net_device *dev)
>  	window_write32(vp, config, 3, Wn3_Config);
>  
>  	if (dev->if_port == XCVR_MII || dev->if_port == XCVR_NWAY) {
> -		mii_reg1 = mdio_read(dev, vp->phys[0], MII_BMSR);
>  		mdio_read(dev, vp->phys[0], MII_LPA);
>  		vp->partner_flow_ctrl = ((mii_reg5 & 0x0400) != 0);
>  		vp->mii.full_duplex = vp->full_duplex;

Here you removed the read, as you did in previous version of the patch.

Michal Kubecek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ