All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH] igb: fix unused igb_deliver_wake_packet() warning when CONFIG_PM=n
Date: Thu, 13 Jul 2017 15:33:20 -0700	[thread overview]
Message-ID: <1499985200.4698.31.camel@intel.com> (raw)
In-Reply-To: <CAOMZO5B1bFRJh3wjbR77HL4ZQ7LqmmSJdeVzRkbyJXUjFFCsrQ@mail.gmail.com>

On Wed, 2017-07-12 at 18:23 -0300, Fabio Estevam wrote:
> On Wed, Jul 12, 2017 at 6:09 PM, Dave Hansen
> <dave.hansen@linux.intel.com> wrote:
> > 
> > From: Dave Hansen <dave.hansen@linux.intel.com>
> > 
> > I'm seeing warnings on kernel configurations where CONFIG_PM is
> > disabled.  It happens in 4.12, at least:
> > 
> > drivers/ethernet/intel/igb/igb_main.c:7988:13: warning:
> > 'igb_deliver_wake_packet' defined but not used [-Wunused-function]
> > 
> > This is because igb_deliver_wake_packet() is defined outside of
> > the #ifdef", but is used only a single time within the #ifdef in
> > igb_resume().  Fix it by moving igb_deliver_wake_packet() next to
> > igb_resume() inside the #ifdef.
> > 
> > The diff ends up looking a bit funky here.  It *looks* like
> > igb_suspend() is getting moved, but that's an artifact of how
> > 'diff' sees the changes.
> > 
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > Cc: intel-wired-lan at lists.osuosl.org
> > Cc: netdev at vger.kernel.org
> > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> 
> Seems to be fixed by the following commit in linux-next:
> 
> commit 000ba1f2ebf0d6f93b9ae6cfbe5417e66f1b8e8c
> Author: Arnd Bergmann <arnd@arndb.de>
> Date:   Thu Apr 27 21:09:52 2017 +0200
> 
>     igb: mark PM functions as __maybe_unused
> 
>     The new wake function is only used by the suspend/resume handlers
> that
>     are defined in inside of an #ifdef, which can cause this harmless
>     warning:
> 
>     drivers/net/ethernet/intel/igb/igb_main.c:7988:13: warning:
> 'igb_deliver_wake_packet' defined but not used [-Wunused-function]
> 
>     Removing the #ifdef, instead using a __maybe_unused annotation
>     simplifies the code and avoids the warning.
> 
>     Fixes: b90fa8763560 ("igb: Enable reading of wake up packet")
>     Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>     Tested-by: Aaron Brown <aaron.f.brown@intel.com>
>     Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Yeah, this is already fixed in my tree.  Dropping this patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <http://lists.osuosl.org/pipermail/intel-wired-lan/attachments/20170713/d6cbf4a1/attachment.asc>

WARNING: multiple messages have this Message-ID (diff)
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
To: Fabio Estevam <festevam@gmail.com>,
	Dave Hansen <dave.hansen@linux.intel.com>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
	intel-wired-lan@lists.osuosl.org,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH] igb: fix unused igb_deliver_wake_packet() warning when CONFIG_PM=n
Date: Thu, 13 Jul 2017 15:33:20 -0700	[thread overview]
Message-ID: <1499985200.4698.31.camel@intel.com> (raw)
In-Reply-To: <CAOMZO5B1bFRJh3wjbR77HL4ZQ7LqmmSJdeVzRkbyJXUjFFCsrQ@mail.gmail.com>

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

On Wed, 2017-07-12 at 18:23 -0300, Fabio Estevam wrote:
> On Wed, Jul 12, 2017 at 6:09 PM, Dave Hansen
> <dave.hansen@linux.intel.com> wrote:
> > 
> > From: Dave Hansen <dave.hansen@linux.intel.com>
> > 
> > I'm seeing warnings on kernel configurations where CONFIG_PM is
> > disabled.  It happens in 4.12, at least:
> > 
> > drivers/ethernet/intel/igb/igb_main.c:7988:13: warning:
> > 'igb_deliver_wake_packet' defined but not used [-Wunused-function]
> > 
> > This is because igb_deliver_wake_packet() is defined outside of
> > the #ifdef", but is used only a single time within the #ifdef in
> > igb_resume().  Fix it by moving igb_deliver_wake_packet() next to
> > igb_resume() inside the #ifdef.
> > 
> > The diff ends up looking a bit funky here.  It *looks* like
> > igb_suspend() is getting moved, but that's an artifact of how
> > 'diff' sees the changes.
> > 
> > Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > Cc: intel-wired-lan@lists.osuosl.org
> > Cc: netdev@vger.kernel.org
> > Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
> 
> Seems to be fixed by the following commit in linux-next:
> 
> commit 000ba1f2ebf0d6f93b9ae6cfbe5417e66f1b8e8c
> Author: Arnd Bergmann <arnd@arndb.de>
> Date:   Thu Apr 27 21:09:52 2017 +0200
> 
>     igb: mark PM functions as __maybe_unused
> 
>     The new wake function is only used by the suspend/resume handlers
> that
>     are defined in inside of an #ifdef, which can cause this harmless
>     warning:
> 
>     drivers/net/ethernet/intel/igb/igb_main.c:7988:13: warning:
> 'igb_deliver_wake_packet' defined but not used [-Wunused-function]
> 
>     Removing the #ifdef, instead using a __maybe_unused annotation
>     simplifies the code and avoids the warning.
> 
>     Fixes: b90fa8763560 ("igb: Enable reading of wake up packet")
>     Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>     Tested-by: Aaron Brown <aaron.f.brown@intel.com>
>     Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

Yeah, this is already fixed in my tree.  Dropping this patch.

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

  reply	other threads:[~2017-07-13 22:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 21:09 [Intel-wired-lan] [PATCH] igb: fix unused igb_deliver_wake_packet() warning when CONFIG_PM=n Dave Hansen
2017-07-12 21:09 ` Dave Hansen
2017-07-12 21:23 ` [Intel-wired-lan] " Fabio Estevam
2017-07-12 21:23   ` Fabio Estevam
2017-07-13 22:33   ` Jeff Kirsher [this message]
2017-07-13 22:33     ` Jeff Kirsher
2017-07-12 21:37 ` [Intel-wired-lan] " David Miller
2017-07-12 21:37   ` David Miller

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=1499985200.4698.31.camel@intel.com \
    --to=jeffrey.t.kirsher@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.