netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Arnd Bergmann <arnd@arndb.de>, linux-arm-kernel@lists.infradead.org
Cc: netdev@vger.kernel.org,
	Mitch Williams <mitch.a.williams@intel.com>,
	Don Skidmore <donald.c.skidmore@intel.com>,
	Shannon Nelson <shannon.nelson@intel.com>,
	Bruce Allan <bruce.w.allan@intel.com>,
	Jesse Brandeburg <jesse.brandeburg@intel.com>,
	linux-kernel@vger.kernel.org,
	John Ronciak <john.ronciak@intel.com>,
	intel-wired-lan@lists.osuosl.org,
	Carolyn Wyborny <carolyn.wyborny@intel.com>,
	davem@davemloft.net
Subject: Re: [PATCH] net: i40e: avoid unused function warnings
Date: Wed, 20 Jan 2016 14:44:45 -0800	[thread overview]
Message-ID: <1453329885.2958.32.camel@intel.com> (raw)
In-Reply-To: <8814508.SjLecHrQqA@wuerfel>

[-- Attachment #1: Type: text/plain, Size: 2858 bytes --]

On Wed, 2016-01-20 at 23:28 +0100, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
> > > 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 <arnd@arndb.de>
> 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 <arnd@arndb.de>

Yeah, I have a fix for that as well.

You can confirm by pulling my next-queue tree (dev-queue branch).
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git d
ev-queue

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2016-01-20 22:44 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-20 10:42 [PATCH] net: i40e: avoid unused function warnings Arnd Bergmann
2016-01-20 22:17 ` Jeff Kirsher
2016-01-20 22:28   ` Arnd Bergmann
2016-01-20 22:44     ` Jeff Kirsher [this message]
2016-01-20 22:54       ` Arnd Bergmann
2016-01-20 23:36         ` Jeff Kirsher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1453329885.2958.32.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=arnd@arndb.de \
    --cc=bruce.w.allan@intel.com \
    --cc=carolyn.wyborny@intel.com \
    --cc=davem@davemloft.net \
    --cc=donald.c.skidmore@intel.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jesse.brandeburg@intel.com \
    --cc=john.ronciak@intel.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mitch.a.williams@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=shannon.nelson@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).