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] [day] [month] [year] [list]
Date:   Wed, 19 Apr 2017 20:47:58 +0000
From:   "Keller, Jacob E" <jacob.e.keller@...el.com>
To:     Arnd Bergmann <arnd@...db.de>,
        "Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:     "Pujari, Bimmy" <bimmy.pujari@...el.com>,
        "Duyck, Alexander H" <alexander.h.duyck@...el.com>,
        "Williams, Mitch A" <mitch.a.williams@...el.com>,
        "Brady, Alan" <alan.brady@...el.com>,
        "Joe Perches" <joe@...ches.com>,
        "Singhai, Anjali" <anjali.singhai@...el.com>,
        "Brandeburg, Jesse" <jesse.brandeburg@...el.com>,
        "Banala, Preethi" <preethi.banala@...el.com>,
        "intel-wired-lan@...ts.osuosl.org" <intel-wired-lan@...ts.osuosl.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH net-next] i40evf: hide unused variable

> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@...db.de]
> Sent: Wednesday, April 19, 2017 10:30 AM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@...el.com>
> Cc: Arnd Bergmann <arnd@...db.de>; Pujari, Bimmy
> <bimmy.pujari@...el.com>; Duyck, Alexander H
> <alexander.h.duyck@...el.com>; Williams, Mitch A
> <mitch.a.williams@...el.com>; Keller, Jacob E <jacob.e.keller@...el.com>; Brady,
> Alan <alan.brady@...el.com>; Joe Perches <joe@...ches.com>; Singhai, Anjali
> <anjali.singhai@...el.com>; Brandeburg, Jesse <jesse.brandeburg@...el.com>;
> Banala, Preethi <preethi.banala@...el.com>; intel-wired-lan@...ts.osuosl.org;
> netdev@...r.kernel.org; linux-kernel@...r.kernel.org
> Subject: [PATCH net-next] i40evf: hide unused variable
> 
> On architectures with larger pages, we get a warning about an unused variable:
> 
> drivers/net/ethernet/intel/i40evf/i40evf_main.c: In function
> 'i40evf_configure_rx':
> drivers/net/ethernet/intel/i40evf/i40evf_main.c:690:21: error: unused variable
> 'netdev' [-Werror=unused-variable]
> 
> This moves the declaration into the #ifdef to avoid the warning.
> 

Makes sense.

Acked-by: Jacob Keller <jacob.e.keller@...el.com>

> Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame
> size for Rx")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
>  drivers/net/ethernet/intel/i40evf/i40evf_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> index 12a930e879af..1bb13c864edd 100644
> --- a/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> +++ b/drivers/net/ethernet/intel/i40evf/i40evf_main.c
> @@ -687,13 +687,14 @@ static void i40evf_configure_tx(struct i40evf_adapter
> *adapter)
>  static void i40evf_configure_rx(struct i40evf_adapter *adapter)
>  {
>  	unsigned int rx_buf_len = I40E_RXBUFFER_2048;
> -	struct net_device *netdev = adapter->netdev;
>  	struct i40e_hw *hw = &adapter->hw;
>  	int i;
> 
>  	/* Legacy Rx will always default to a 2048 buffer size. */
>  #if (PAGE_SIZE < 8192)
>  	if (!(adapter->flags & I40EVF_FLAG_LEGACY_RX)) {
> +		struct net_device *netdev = adapter->netdev;
> +
>  		/* For jumbo frames on systems with 4K pages we have to use
>  		 * an order 1 page, so we might as well increase the size
>  		 * of our Rx buffer to make better use of the available space
> --
> 2.9.0

Powered by blists - more mailing lists