From patchwork Wed Apr 19 17:29:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 752382 X-Patchwork-Delegate: jeffrey.t.kirsher@intel.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3w7TY40YXHz9s65 for ; Thu, 20 Apr 2017 03:30:31 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2F394895C3; Wed, 19 Apr 2017 17:30:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eKHg1QoepggC; Wed, 19 Apr 2017 17:30:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 71D76895C2; Wed, 19 Apr 2017 17:30:28 +0000 (UTC) X-Original-To: intel-wired-lan@lists.osuosl.org Delivered-To: intel-wired-lan@lists.osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 6003C1C2E64 for ; Wed, 19 Apr 2017 17:30:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5A9658879F for ; Wed, 19 Apr 2017 17:30:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oMwN7R_5ZtQo for ; Wed, 19 Apr 2017 17:30:25 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.131]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 276BC88797 for ; Wed, 19 Apr 2017 17:30:24 +0000 (UTC) Received: from wuerfel.lan ([78.42.17.5]) by mrelayeu.kundenserver.de (mreue002 [212.227.15.129]) with ESMTPA (Nemesis) id 0M31zr-1c865A2WQB-00ssZ5; Wed, 19 Apr 2017 19:30:07 +0200 From: Arnd Bergmann To: Jeff Kirsher 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= Cc: Arnd Bergmann , linux-kernel@vger.kernel.org, Joe Perches , netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org Subject: [Intel-wired-lan] [PATCH net-next] i40evf: hide unused variable X-BeenThere: intel-wired-lan@lists.osuosl.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-wired-lan-bounces@lists.osuosl.org Sender: "Intel-wired-lan" 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 Acked-by: Jacob Keller Tested-by: Andrew Bowers --- 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