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: <20190218.121337.147896114474592034.davem@davemloft.net>
Date:   Mon, 18 Feb 2019 12:13:37 -0800 (PST)
From:   David Miller <davem@...emloft.net>
To:     yuehaibing@...wei.com
Cc:     yang.wei9@....com.cn, netdev@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH net-next] yellowfin: fix remove set but not used
 variable warning

From: YueHaibing <yuehaibing@...wei.com>
Date: Mon, 18 Feb 2019 08:15:46 +0000

> @@ -1050,8 +1050,11 @@ static int yellowfin_rx(struct net_device *dev)
>  		struct sk_buff *rx_skb = yp->rx_skbuff[entry];
>  		s16 frame_status;
>  		u16 desc_status;
> -		int data_size, yf_size;
> +		int data_size;
>  		u8 *buf_addr;
> +#ifdef YF_PROTOTYPE
> +		int yf_size = sizeof(struct yellowfin_desc);
> +#endif

This is just silly.

Please move this variable declaration and initialization into the
YF_PROTOTYPE basic block in the code below it, like this:

#ifdef YF_PROTOTYPE		/* Support for prototype hardware errata. */
		} else if ((yp->flags & HasMACAddrBug)  &&
			int yf_size = sizeof(struct yellowfin_desc);

			!ether_addr_equal(le32_to_cpu(yp->rx_ring_dma +
						      entry * yf_size),
					  dev->dev_addr) &&
			!ether_addr_equal(le32_to_cpu(yp->rx_ring_dma +
						      entry * yf_size),
					  "\377\377\377\377\377\377")) {
			if (bogus_rx++ == 0)
				netdev_warn(dev, "Bad frame to %pM\n",
					    buf_addr);
#endif

Thanks.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ