linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mailbox: imx: Mark PM functions as __maybe_unused
@ 2020-06-23  1:04 Nathan Chancellor
  2020-06-23  2:14 ` Aisheng Dong
  0 siblings, 1 reply; 3+ messages in thread
From: Nathan Chancellor @ 2020-06-23  1:04 UTC (permalink / raw)
  To: Jassi Brar
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	NXP Linux Team, Anson Huang, linux-kernel, linux-arm-kernel,
	Nathan Chancellor

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: bb2b2624dbe2 ("mailbox: imx: Add runtime PM callback to handle MU clocks")
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
---
 drivers/mailbox/imx-mailbox.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 7205b825c8b5..2543c7b6948b 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -598,7 +598,7 @@ static const struct of_device_id imx_mu_dt_ids[] = {
 };
 MODULE_DEVICE_TABLE(of, imx_mu_dt_ids);
 
-static int imx_mu_suspend_noirq(struct device *dev)
+static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
 {
 	struct imx_mu_priv *priv = dev_get_drvdata(dev);
 
@@ -608,7 +608,7 @@ static int imx_mu_suspend_noirq(struct device *dev)
 	return 0;
 }
 
-static int imx_mu_resume_noirq(struct device *dev)
+static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
 {
 	struct imx_mu_priv *priv = dev_get_drvdata(dev);
 
@@ -626,7 +626,7 @@ static int imx_mu_resume_noirq(struct device *dev)
 	return 0;
 }
 
-static int imx_mu_runtime_suspend(struct device *dev)
+static int __maybe_unused imx_mu_runtime_suspend(struct device *dev)
 {
 	struct imx_mu_priv *priv = dev_get_drvdata(dev);
 
@@ -635,7 +635,7 @@ static int imx_mu_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int imx_mu_runtime_resume(struct device *dev)
+static int __maybe_unused imx_mu_runtime_resume(struct device *dev)
 {
 	struct imx_mu_priv *priv = dev_get_drvdata(dev);
 	int ret;

base-commit: 27f11fea33608cbd321a97cbecfa2ef97dcc1821
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* RE: [PATCH] mailbox: imx: Mark PM functions as __maybe_unused
  2020-06-23  1:04 [PATCH] mailbox: imx: Mark PM functions as __maybe_unused Nathan Chancellor
@ 2020-06-23  2:14 ` Aisheng Dong
  2020-06-30 21:08   ` Nathan Chancellor
  0 siblings, 1 reply; 3+ messages in thread
From: Aisheng Dong @ 2020-06-23  2:14 UTC (permalink / raw)
  To: Nathan Chancellor, Jassi Brar
  Cc: Shawn Guo, Sascha Hauer, Pengutronix Kernel Team, Fabio Estevam,
	dl-linux-imx, Anson Huang, linux-kernel, linux-arm-kernel

> From: Nathan Chancellor <natechancellor@gmail.com>
> Sent: Tuesday, June 23, 2020 9:04 AM
> 
> 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: bb2b2624dbe2 ("mailbox: imx: Add runtime PM callback to handle MU
> clocks")
> Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>

Thanks for catching this.

Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>

Regards
Aisheng

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] mailbox: imx: Mark PM functions as __maybe_unused
  2020-06-23  2:14 ` Aisheng Dong
@ 2020-06-30 21:08   ` Nathan Chancellor
  0 siblings, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2020-06-30 21:08 UTC (permalink / raw)
  To: Aisheng Dong
  Cc: Jassi Brar, Shawn Guo, Sascha Hauer, Pengutronix Kernel Team,
	Fabio Estevam, dl-linux-imx, Anson Huang, linux-kernel,
	linux-arm-kernel

On Tue, Jun 23, 2020 at 02:14:05AM +0000, Aisheng Dong wrote:
> > From: Nathan Chancellor <natechancellor@gmail.com>
> > Sent: Tuesday, June 23, 2020 9:04 AM
> > 
> > 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: bb2b2624dbe2 ("mailbox: imx: Add runtime PM callback to handle MU
> > clocks")
> > Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
> 
> Thanks for catching this.
> 
> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
> 
> Regards
> Aisheng

Thank you for the review :)

These warnings were introduced by a patch in this merge window, it would
be nice if this patch could be fixed up as a fix for that but I
understand if it is too late for that.

Cheers,
Nathan

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-06-30 21:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-06-23  1:04 [PATCH] mailbox: imx: Mark PM functions as __maybe_unused Nathan Chancellor
2020-06-23  2:14 ` Aisheng Dong
2020-06-30 21:08   ` Nathan Chancellor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).