]> git.baikalelectronics.ru Git - kernel.git/commit
igb: mark PM functions as __maybe_unused
authorArnd Bergmann <arnd@arndb.de>
Thu, 27 Apr 2017 19:09:52 +0000 (21:09 +0200)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Tue, 6 Jun 2017 07:51:36 +0000 (00:51 -0700)
commit795e29619c3e762abae5b0ee1ae6dc9b5f4c4737
treebd8fcd2afaa3fdca25f710b872b6270db10d73ff
parent18ef6e1a5b8e56df316cb4686f0f0b60c767507a
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: 6e233b652962 ("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>
drivers/net/ethernet/intel/igb/igb_main.c