Re: [PATCH] igb: fix unused igb_deliver_wake_packet() warning when CONFIG_PM=n

From: David Miller
Date: Wed Jul 12 2017 - 17:38:22 EST

From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
Date: Wed, 12 Jul 2017 14:09:25 -0700

> From: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>
> 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@xxxxxxxxx>
> Cc: intel-wired-lan@xxxxxxxxxxxxxxxx
> Cc: netdev@xxxxxxxxxxxxxxx
> Signed-off-by: Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>

I'll let Jeff queue this up into his tree.