]> git.baikalelectronics.ru Git - kernel.git/commit
ice: mark PM functions as __maybe_unused
authorWei Yongjun <weiyongjun1@huawei.com>
Tue, 28 Jul 2020 01:41:53 +0000 (09:41 +0800)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Sat, 1 Aug 2020 15:15:56 +0000 (08:15 -0700)
commitb6f028d5d09cdb82a8948477976a1ef0d8ca8559
tree202a6f0aa5b683f6d67b531bd0b6cb02d83220e8
parent436da75a88936286831a92392e690193bbdd350c
ice: mark PM functions as __maybe_unused

In certain configurations without power management support, the
following warnings happen:

drivers/net/ethernet/intel/ice/ice_main.c:4214:12: warning:
 'ice_resume' defined but not used [-Wunused-function]
 4214 | static int ice_resume(struct device *dev)
      |            ^~~~~~~~~~
drivers/net/ethernet/intel/ice/ice_main.c:4150:12: warning:
 'ice_suspend' defined but not used [-Wunused-function]
 4150 | static int ice_suspend(struct device *dev)
      |            ^~~~~~~~~~~

Mark these functions as __maybe_unused to make it clear to the
compiler that this is going to happen based on the configuration,
which is the standard for these types of functions.

Fixes: 2a199c8d849c ("ice: Add advanced power mgmt for WoL")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/ice/ice_main.c