Skip to content

Commit 03b7013

Browse files
nathanchanceJassiBrar
authored andcommitted
mailbox: imx: Mark PM functions as __maybe_unused
When CONFIG_PM and CONFIG_PM_SLEEP are unset, the following warnings occur: drivers/mailbox/imx-mailbox.c:638:12: warning: 'imx_mu_runtime_resume' defined but not used [-Wunused-function] 638 | static int imx_mu_runtime_resume(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:629:12: warning: 'imx_mu_runtime_suspend' defined but not used [-Wunused-function] 629 | static int imx_mu_runtime_suspend(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:611:12: warning: 'imx_mu_resume_noirq' defined but not used [-Wunused-function] 611 | static int imx_mu_resume_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~ drivers/mailbox/imx-mailbox.c:601:12: warning: 'imx_mu_suspend_noirq' defined but not used [-Wunused-function] 601 | static int imx_mu_suspend_noirq(struct device *dev) | ^~~~~~~~~~~~~~~~~~~~ Mark these functions as __maybe_unused, which is the standard procedure for PM functions. Fixes: bb2b262 ("mailbox: imx: Add runtime PM callback to handle MU clocks") Signed-off-by: Nathan Chancellor <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent 425ab03 commit 03b7013

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/mailbox/imx-mailbox.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ static const struct of_device_id imx_mu_dt_ids[] = {
598598
};
599599
MODULE_DEVICE_TABLE(of, imx_mu_dt_ids);
600600

601-
static int imx_mu_suspend_noirq(struct device *dev)
601+
static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
602602
{
603603
struct imx_mu_priv *priv = dev_get_drvdata(dev);
604604

@@ -608,7 +608,7 @@ static int imx_mu_suspend_noirq(struct device *dev)
608608
return 0;
609609
}
610610

611-
static int imx_mu_resume_noirq(struct device *dev)
611+
static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
612612
{
613613
struct imx_mu_priv *priv = dev_get_drvdata(dev);
614614

@@ -626,7 +626,7 @@ static int imx_mu_resume_noirq(struct device *dev)
626626
return 0;
627627
}
628628

629-
static int imx_mu_runtime_suspend(struct device *dev)
629+
static int __maybe_unused imx_mu_runtime_suspend(struct device *dev)
630630
{
631631
struct imx_mu_priv *priv = dev_get_drvdata(dev);
632632

@@ -635,7 +635,7 @@ static int imx_mu_runtime_suspend(struct device *dev)
635635
return 0;
636636
}
637637

638-
static int imx_mu_runtime_resume(struct device *dev)
638+
static int __maybe_unused imx_mu_runtime_resume(struct device *dev)
639639
{
640640
struct imx_mu_priv *priv = dev_get_drvdata(dev);
641641
int ret;

0 commit comments

Comments
 (0)