Skip to content

Commit 79f9fbe

Browse files
nathanchanceJassiBrar
authored andcommitted
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 1a3c7bb ("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: c25f778 ("mailbox: qcom-ipcc: Log the pending interrupt during resume") Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Sibi Sankar <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent bca1a10 commit 79f9fbe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/mailbox/qcom-ipcc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ static const struct of_device_id qcom_ipcc_of_match[] = {
344344
MODULE_DEVICE_TABLE(of, qcom_ipcc_of_match);
345345

346346
static const struct dev_pm_ops qcom_ipcc_dev_pm_ops = {
347-
SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, qcom_ipcc_pm_resume)
347+
NOIRQ_SYSTEM_SLEEP_PM_OPS(NULL, qcom_ipcc_pm_resume)
348348
};
349349

350350
static struct platform_driver qcom_ipcc_driver = {

0 commit comments

Comments
 (0)