From: Dave Hansen <dave.hansen@linux.intel.com> Date: 2017-07-12 21:10:47
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 <redacted>
Cc: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
---
b/drivers/net/ethernet/intel/igb/igb_main.c | 46 ++++++++++++++--------------
1 file changed, 23 insertions(+), 23 deletions(-)
diff -puN drivers/net/ethernet/intel/igb/igb_main.c~undef-igb_deliver_wake_packet drivers/net/ethernet/intel/igb/igb_main.c
On Wed, Jul 12, 2017 at 6:09 PM, Dave Hansen
[off-list ref] 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 <redacted>
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 [off-list ref]
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 [off-list ref]
Tested-by: Aaron Brown [off-list ref]
Signed-off-by: Jeff Kirsher [off-list ref]
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 <redacted>
Cc: intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
From: Jeff Kirsher <hidden> Date: 2017-07-13 22:33:23
On Wed, 2017-07-12 at 18:23 -0300, Fabio Estevam wrote:
On Wed, Jul 12, 2017 at 6:09 PM, Dave Hansen
[off-list ref] wrote:
quoted
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 <redacted>
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 [off-list ref]
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 [off-list ref]
Tested-by: Aaron Brown [off-list ref]
Signed-off-by: Jeff Kirsher [off-list ref]
Yeah, this is already fixed in my tree. Dropping this patch.