From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758453AbcATW3U (ORCPT ); Wed, 20 Jan 2016 17:29:20 -0500 Received: from mout.kundenserver.de ([212.227.17.10]:54018 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752377AbcATW3R (ORCPT ); Wed, 20 Jan 2016 17:29:17 -0500 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: Jeff Kirsher , netdev@vger.kernel.org, Mitch Williams , Don Skidmore , Shannon Nelson , Bruce Allan , Jesse Brandeburg , linux-kernel@vger.kernel.org, John Ronciak , intel-wired-lan@lists.osuosl.org, Carolyn Wyborny , davem@davemloft.net Subject: Re: [PATCH] net: i40e: avoid unused function warnings Date: Wed, 20 Jan 2016 23:28:34 +0100 Message-ID: <8814508.SjLecHrQqA@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <1453328245.2958.28.camel@intel.com> References: <2806620.EpZqDlZTO3@wuerfel> <1453328245.2958.28.camel@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:9taDuxe/9GIT+XVKtBGAqrVZwfL4vnXS71XrkDsXGQBXBR8bpHc zSNxBCS7AgWM/KaeHbDEtHINHmzkfKWdUvlKR4WR65hjrwsub1WljtNdfKMBvhI/yBpmJhx Gmc/chUDnfPp7NGzd8Kfx1Nx79dfGA5wJaNyrmv/fNFKRbqgQgGRaru8zftvHE9knXM0tam WISjUDpBtfodpOdLnZkVA== X-UI-Out-Filterresults: notjunk:1;V01:K0:nTq6N7qSuhY=:DiSUQu+cAeHK6Kf8uiwHrG QT79NbTprUdyOvxFirYe+x7TeN6fWPUeKlVC6aVtjD05ZlbJnPNGCeJ30uTOZj4cTCy5tIElO cK45pm0M77C2+OjPm4NDQGV/tIvbJBmK3X5hhxN5rsEbKWBR57r7RWAFq1Wd9OVuGz6wWlKth JM8n2UsH1QPjsdTkIVag6AvF2xngQQu70VRKRAiEftBRv4DfyNeh3fClcADWUuk8yzxF62/gN rjb1HkH4hjwSpApRp9yZlbtDTJnpSWHNFqVoL9wsThTJsSPjDJGUxHxXwDCs2sSpkDBCwUJd+ BAWOCHdops5Xx0RSQdhYucmxzZsvYWj0TQK88aDLY/lHk+Gsm+xW7GALTByNRaROA1XSrnHrv 4kyAfV5CUOOMHM/+/7Gpqzyu5gzplFRLp+oDmPM7prVNdtN1z6paSViYFmN2udzkU9pxgff0S d6lo8YTEkRv1wQ/aQ97RBlVonvNGRMP3X4J5kXTufBNgkC1xuV0td/J/pW+zgvEX4VhGoVlYc UnAzP7LNjcOQ3rS13nlNzVKPOFpOZ3K0QkpPbEGycQyi5WTur4h7ZeqfPS8SkecmpqgG5GAcw CNf7VCj/UOdyYRHc752cBLTfla5M2cgEuwSI8JLbcDyMdf0OtdFU5ZqpbzP95LlWK5IpMwvPp 4/zOM95kGaMGH9TSwr05D9Vjb0OAccY3DSqyulrphontxtg4PsUQdz6ogH8r03iWwfYWlIUOk AFoCGXS74cqeQ+qaK/jpX51/2pKhcPF5ZPyyiodFeem/8PSI8HU9GD7wBcrpvjVVVNfhbYmUd /iEDWedz8ZntSqfKRVTwaRkXF6/M5VC3HOVN4sW9qlQvR3LIpM= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wednesday 20 January 2016 14:17:25 Jeff Kirsher wrote: > On Wed, 2016-01-20 at 11:42 +0100, Arnd Bergmann wrote: > > The addition of the geneve tunnel offload code left a couple > > of functions unconditionally defined but empty whenever CONFIG_VXLAN > > and CONFIG_GENEVE are disabled. gcc warns about this: > > > > i40e_main.c:7049:13: warning: 'i40e_sync_udp_filters_subtask' defined > > but not used [-Wunused-function] > > i40e_main.c:8516:13: warning: 'i40e_add_vxlan_port' defined but not > > used [-Wunused-function] > > i40e_main.c:8561:13: warning: 'i40e_del_vxlan_port' defined but not > > used [-Wunused-function] > > i40e_main.c:8596:13: warning: 'i40e_add_geneve_port' defined but not > > used [-Wunused-function] > > i40e_main.c:8643:13: warning: 'i40e_del_geneve_port' defined but not > > used [-Wunused-function] > > > > This moves the #ifdef statements to the outside of the affected > > functions, which avoids the warnings. > > > > Signed-off-by: Arnd Bergmann > > Fixes: 6a899024058d ("i40e: geneve tunnel offload support") > > --- > > This is a harmless regression against v4.4, found on ARM randconfig > > builds > > Thanks Arnd, I already have a patch from Eric Dumazet and Alex Duyck to > resolve this issue. > > Dave- I plan on pushing the fix later today to net. Ok, thanks. FWIW, I have another patch for this driver that I did not yet submit because it's not a regression and I haven't written a proper changelog for it (it's in a set of 15 patches for netdev that fix harmless warnings). Do you have one for the warning below as well? I could not come up with a better way than adding a bogus initialization, but maybe there is one. Arnd >>From d89be3f0f932a71dfb5480ee396db514879097c4 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Fri, 15 Jan 2016 17:31:07 +0100 Subject: [PATCH] net: i40e: shut up uninitialized variable warnings intel/i40e/i40e_txrx.c: In function 'i40e_xmit_frame_ring': intel/i40e/i40e_txrx.c:2367:20: error: 'oiph' may be used uninitialized in this function [-Werror=maybe-uninitialized] intel/i40e/i40e_txrx.c:2317:16: note: 'oiph' was declared here intel/i40e/i40e_txrx.c:2367:17: error: 'oudph' may be used uninitialized in this function [-Werror=maybe-uninitialized] intel/i40e/i40e_txrx.c:2316:17: note: 'oudph' was declared here Signed-off-by: Arnd Bergmann diff --git a/drivers/net/ethernet/intel/i40e/i40e_txrx.c b/drivers/net/ethernet/intel/i40e/i40e_txrx.c index 720516b0e8ee..47bd8b3145a7 100644 --- a/drivers/net/ethernet/intel/i40e/i40e_txrx.c +++ b/drivers/net/ethernet/intel/i40e/i40e_txrx.c @@ -2313,8 +2313,8 @@ static void i40e_tx_enable_csum(struct sk_buff *skb, u32 *tx_flags, struct iphdr *this_ip_hdr; u32 network_hdr_len; u8 l4_hdr = 0; - struct udphdr *oudph; - struct iphdr *oiph; + struct udphdr *oudph = NULL; + struct iphdr *oiph = NULL; u32 l4_tunnel = 0; if (skb->encapsulation) {