• Wei Yongjun's avatar
    ice: mark PM functions as __maybe_unused · 65c72291
    Wei Yongjun authored
    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: 769c500d ("ice: Add advanced power mgmt for WoL")
    Reported-by: default avatarHulk Robot <hulkci@huawei.com>
    Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
    Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
    Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
    65c72291
ice_main.c 181 KB