]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP
authorJoakim Zhang <qiangqing.zhang@nxp.com>
Thu, 9 Sep 2021 09:23:22 +0000 (17:23 +0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Sep 2021 10:14:07 +0000 (11:14 +0100)
commit3e00922f9651612f079fa3b96af53714305704fe
tree737205dccb9016a5457f46e6f8c948ee26af7833
parent2fa0a112120409b33340f4c36b7c3c3bc875f6d4
net: stmmac: platform: fix build warning when with !CONFIG_PM_SLEEP

Use __maybe_unused for noirq_suspend()/noirq_resume() hooks to avoid
build warning with !CONFIG_PM_SLEEP:

>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:796:12: error: 'stmmac_pltfr_noirq_resume' defined but not used [-Werror=unused-function]
     796 | static int stmmac_pltfr_noirq_resume(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:775:12: error: 'stmmac_pltfr_noirq_suspend' defined but not used [-Werror=unused-function]
     775 | static int stmmac_pltfr_noirq_suspend(struct device *dev)
         |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: all warnings being treated as errors

Fixes: a62e35e9df3f ("net: stmmac: fix system hang caused by eee_ctrl_timer during suspend/resume")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c