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: <20201112100658.GB1997862@dell>
Date:   Thu, 12 Nov 2020 10:06:58 +0000
From:   Lee Jones <lee.jones@...aro.org>
To:     davem@...emloft.net
Cc:     Nicolas Pitre <nico@...xnic.net>, Jakub Kicinski <kuba@...nel.org>,
        Erik Stahlman <erik@...edu>, Peter Cammaert <pc@...kart.be>,
        Daris A Nevil <dnevil@...c.com>,
        Russell King <rmk@....linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH 30/30] net: ethernet: smsc: smc91x: Mark 'pkt_len' as
 __maybe_unused

On Mon, 02 Nov 2020, Lee Jones wrote:

> 'pkt_len' is used to interact with a hardware register.  It might not
> be safe to remove it entirely.  Mark it as __maybe_unused instead.
> 
> Fixes the following W=1 kernel build warning(s):
> 
>  drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_tx’:
>  drivers/net/ethernet/smsc/smc91x.c:706:51: warning: variable ‘pkt_len’ set but not used [-Wunused-but-set-variable]
> 
> Cc: Nicolas Pitre <nico@...xnic.net>
> Cc: "David S. Miller" <davem@...emloft.net>
> Cc: Jakub Kicinski <kuba@...nel.org>
> Cc: Erik Stahlman <erik@...edu>
> Cc: Peter Cammaert <pc@...kart.be>
> Cc: Daris A Nevil <dnevil@...c.com>
> Cc: Russell King <rmk@....linux.org.uk>
> Cc: netdev@...r.kernel.org
> Signed-off-by: Lee Jones <lee.jones@...aro.org>
> ---
>  drivers/net/ethernet/smsc/smc91x.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
> index b5d053292e717..a3f37b1f86491 100644
> --- a/drivers/net/ethernet/smsc/smc91x.c
> +++ b/drivers/net/ethernet/smsc/smc91x.c
> @@ -703,7 +703,7 @@ static void smc_tx(struct net_device *dev)
>  {
>  	struct smc_local *lp = netdev_priv(dev);
>  	void __iomem *ioaddr = lp->base;
> -	unsigned int saved_packet, packet_no, tx_status, pkt_len;
> +	unsigned int saved_packet, packet_no, tx_status, __maybe_unused pkt_len;
>  
>  	DBG(3, dev, "%s\n", __func__);

This one is still lingering.  Looks like it's still relevant.

-- 
Lee Jones [李琼斯]
Senior Technical Lead - Developer Services
Linaro.org │ Open source software for Arm SoCs
Follow Linaro: Facebook | Twitter | Blog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ