Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S968496AbdDSRaY (ORCPT ); Wed, 19 Apr 2017 13:30:24 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:64269 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S968464AbdDSRaW (ORCPT ); Wed, 19 Apr 2017 13:30:22 -0400 From: Arnd Bergmann To: Jeff Kirsher Cc: Arnd Bergmann , Bimmy Pujari , Alexander Duyck , Mitch Williams , Jacob Keller , Alan Brady , Joe Perches , Anjali Singhai Jain , Jesse Brandeburg , Preethi Banala , intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net-next] i40evf: hide unused variable Date: Wed, 19 Apr 2017 19:29:48 +0200 Message-Id: <20170419173008.3648215-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:mKs7x5V382aCHTecCCrXtm+5NmEgI1aCZZv9DljSkYr29qGt1uX 8Sjg7uqtnK9mWuIwpnW8SrCWy9VP+hGysEi9D41fT6jvYpFmUyuhn3S7jdLqpGLTynKyPp6 4oREE+Gz4qXWpekig/YaMFwOPvssLApexEnk/e32EJoGn8+SyntNes4k9X4LGJylHFqaXKD J8xjP7b3NUy87QAYx0TCg== X-UI-Out-Filterresults: notjunk:1;V01:K0:3zM+753HjrE=:0uylRmf/K/yR5Gm0EpdtPU TwZjjy/whvvnBMNsxy+f8xJMNzci5l3+749lJitA91yqMw6Rn1F49BCpRpPwBlFGJ3PFIimJ/ 6Rq+R7tczrQrjbT5kD07F2/W0cZyTgXEerLf9lF4esk3RWZ5eH13GKMpaCgseb3zeDuWd93I0 D30rnMs88iaywz6ePlWwmrn4XrqE5HVDRXHZW2kqmprfxzxOgnZaB6gskFmCEcmUtk3VEQRdz Uq9j8S888yj2tgO54atYQoqDGRrxfoNf/Bfo4EtJuo0P/wRuZcwHriE10bqUthRkmeNzpCw/Q 0I6t6iwH8ThEOrhk0zmfGtyJngpCu7MsG/Z/16PTreznNuAXKg+Z1h+5HL7oGIpPdntD/4WYY CfpogiQlhYmpR/nARxk+xo17F+YzD44T3pOQO4e50bz0Fuyby7Mue2MRWXxn9h4jDGm9gvZJ9 me87uiK0G7UKy0kWD60TQR/D7iuPAxJNKQyiwoiKXp/4snYS2oFyGr+/kCLWQ/RVaDCJ0F+E4 14HtRRJXgxo3BcKRSxBwAP2Siwt5+vsinUgQzxsMKVg0loGGG//XY+roii2XjnckZLCUcML0K go4ZCjxJenh01UwBFO2MBzWx8hasvk9xSoioORrfFjbRGSewCH8psQQnQL2sXRkDlC0Vnyswd 2E8KxwUXwaXcaQzW9xxJ4DK6o821WC1dycTQvsnigniwd1PLj8K4g3lCyd8UkmdOmAYQ= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1532 Lines: 35 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. 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