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: <20180115.151129.548561689212709042.davem@davemloft.net>
Date:   Mon, 15 Jan 2018 15:11:29 -0500 (EST)
From:   David Miller <davem@...emloft.net>
To:     yanjun.zhu@...cle.com
Cc:     netdev@...r.kernel.org, keescook@...omium.org
Subject: Re: [PATCH net-next 1/1] forcedeth: remove unused variable

From: Zhu Yanjun <yanjun.zhu@...cle.com>
Date: Mon, 15 Jan 2018 00:32:22 -0500

> The variable miistat is not used. So it is removed.
> 
> CC: Srinivas Eeda <srinivas.eeda@...cle.com>
> CC: Joe Jin <joe.jin@...cle.com>
> CC: Junxiao Bi <junxiao.bi@...cle.com>
> Signed-off-by: Zhu Yanjun <yanjun.zhu@...cle.com>
> ---
>  drivers/net/ethernet/nvidia/forcedeth.c | 7 ++-----
>  1 file changed, 2 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/net/ethernet/nvidia/forcedeth.c b/drivers/net/ethernet/nvidia/forcedeth.c
> index 21e15cb..c518f8c 100644
> --- a/drivers/net/ethernet/nvidia/forcedeth.c
> +++ b/drivers/net/ethernet/nvidia/forcedeth.c
> @@ -5510,11 +5510,8 @@ static int nv_open(struct net_device *dev)
>  	/* One manual link speed update: Interrupts are enabled, future link
>  	 * speed changes cause interrupts and are handled by nv_link_irq().
>  	 */
> -	{
> -		u32 miistat;
> -		miistat = readl(base + NvRegMIIStatus);
> -		writel(NVREG_MIISTAT_MASK_ALL, base + NvRegMIIStatus);
> -	}
> +	writel(NVREG_MIISTAT_MASK_ALL, base + NvRegMIIStatus);
> +

The readl() may have side effects and be necessary to clear some state
in the register.  I don't think you can remove the readl() without
verifying this and making sure it really is not necessary.

I can't apply this patch, sorry.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ