RE: [Intel-wired-lan] [PATCH net-next] igb: mark PM functions as __maybe_unused

From: Brown, Aaron F
Date: Tue May 02 2017 - 21:37:09 EST


> From: Intel-wired-lan [mailto:intel-wired-lan-bounces@xxxxxxxxxxxxxxxx] On
> Behalf Of Arnd Bergmann
> Sent: Thursday, April 27, 2017 12:10 PM
> To: Kirsher, Jeffrey T <jeffrey.t.kirsher@xxxxxxxxx>
> Cc: Arnd Bergmann <arnd@xxxxxxxx>; netdev@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx; intel-wired-lan@xxxxxxxxxxxxxxxx; David S. Miller
> <davem@xxxxxxxxxxxxx>
> Subject: [Intel-wired-lan] [PATCH net-next] 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@xxxxxxxx>
> ---
> drivers/net/ethernet/intel/igb/igb_main.c | 18 +++++-------------
> 1 file changed, 5 insertions(+), 13 deletions(-)

Tested-by: Aaron Brown <aaron.f.brown@xxxxxxxxx>