Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S939599AbdDSUsH (ORCPT ); Wed, 19 Apr 2017 16:48:07 -0400 Received: from mga14.intel.com ([192.55.52.115]:47655 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S939581AbdDSUsF (ORCPT ); Wed, 19 Apr 2017 16:48:05 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,222,1488873600"; d="scan'208";a="1137823561" From: "Keller, Jacob E" To: Arnd Bergmann , "Kirsher, Jeffrey T" CC: "Pujari, Bimmy" , "Duyck, Alexander H" , "Williams, Mitch A" , "Brady, Alan" , "Joe Perches" , "Singhai, Anjali" , "Brandeburg, Jesse" , "Banala, Preethi" , "intel-wired-lan@lists.osuosl.org" , "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH net-next] i40evf: hide unused variable Thread-Topic: [PATCH net-next] i40evf: hide unused variable Thread-Index: AQHSuTKiWnpsxK0AsUWFUp2xbE+wVaHNKe1w Date: Wed, 19 Apr 2017 20:47:58 +0000 Message-ID: <02874ECE860811409154E81DA85FBB5857E088EB@ORSMSX115.amr.corp.intel.com> References: <20170419173008.3648215-1-arnd@arndb.de> In-Reply-To: <20170419173008.3648215-1-arnd@arndb.de> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiMTU3MDBlM2EtZmI1ZS00NDg2LTkxYWMtNzE0MWJhNGRjNDVmIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE1LjkuNi42IiwiVHJ1c3RlZExhYmVsSGFzaCI6InNxOGdjNUNCMlRGOVlWbytQYURCenFpNkxiRFZ4M0dQMFVaa2cxVklENEE9In0= x-ctpclassification: CTP_IC dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.22.254.140] Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from base64 to 8bit by mail.home.local id v3JKmGUT029956 Content-Length: 2432 Lines: 60 > -----Original Message----- > From: Arnd Bergmann [mailto:arnd@arndb.de] > Sent: Wednesday, April 19, 2017 10:30 AM > To: Kirsher, Jeffrey T > Cc: Arnd Bergmann ; Pujari, Bimmy > ; Duyck, Alexander H > ; Williams, Mitch A > ; Keller, Jacob E ; Brady, > Alan ; Joe Perches ; Singhai, Anjali > ; Brandeburg, Jesse ; > Banala, Preethi ; intel-wired-lan@lists.osuosl.org; > netdev@vger.kernel.org; linux-kernel@vger.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 > Fixes: dab86afdbbd1 ("i40e/i40evf: Change the way we limit the maximum frame > size for Rx") > Signed-off-by: Arnd Bergmann > --- > 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