]> git.baikalelectronics.ru Git - kernel.git/commit
mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n
authorNathan Chancellor <nathan@kernel.org>
Mon, 23 May 2022 22:47:02 +0000 (15:47 -0700)
committerJassi Brar <jaswinder.singh@linaro.org>
Tue, 24 May 2022 13:08:24 +0000 (08:08 -0500)
commit60c880b7450d8ec30e1289ba9cdfbde5a58530d6
treee9561470955fcf0cac216074ff7d5456c48fc7f4
parentac120f0ba7574965f07c789aa3147a0a00254834
mailbox: qcom-ipcc: Fix -Wunused-function with CONFIG_PM_SLEEP=n

When CONFIG_PM_SLEEP is not set, there is a warning that
qcom_ipcc_pm_resume() is unused:

  drivers/mailbox/qcom-ipcc.c:258:12: error: 'qcom_ipcc_pm_resume' defined but not used [-Werror=unused-function]
    258 | static int qcom_ipcc_pm_resume(struct device *dev)
        |            ^~~~~~~~~~~~~~~~~~~
  cc1: all warnings being treated as errors

Commit 2238160b4f05 ("PM: core: Add new *_PM_OPS macros, deprecate old
ones") reworked the PM_OPS macros to avoid this problem. Use
NOIRQ_SYSTEM_SLEEP_PM_OPS directly so that qcom_ipcc_pm_resume() always
appears to be used to the compiler, even though it will be dead code
eliminated in the !CONFIG_PM_SLEEP case.

Fixes: a69dcdb676bd ("mailbox: qcom-ipcc: Log the pending interrupt during resume")
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Sibi Sankar <quic_sibis@quicinc.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
drivers/mailbox/qcom-ipcc.c