linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] media: renesas-ceu: mark PM functions as __maybe_unused
@ 2018-02-28 23:19 Arnd Bergmann
  2018-03-01  9:59 ` Simon Horman
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2018-02-28 23:19 UTC (permalink / raw)
  To: Jacopo Mondi, Mauro Carvalho Chehab
  Cc: Arnd Bergmann, Miguel Ojeda, Hans Verkuil, linux-media,
	linux-renesas-soc, linux-kernel

The PM runtime operations are unused when CONFIG_PM is disabled,
leading to a harmless warning:

drivers/media/platform/renesas-ceu.c:1003:12: error: 'ceu_runtime_suspend' defined but not used [-Werror=unused-function]
 static int ceu_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~
drivers/media/platform/renesas-ceu.c:987:12: error: 'ceu_runtime_resume' defined but not used [-Werror=unused-function]
 static int ceu_runtime_resume(struct device *dev)
            ^~~~~~~~~~~~~~~~~~

This adds a __maybe_unused annotation to shut up the warning.

Fixes: 32e5a70dc8f4 ("media: platform: Add Renesas CEU driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/media/platform/renesas-ceu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/media/platform/renesas-ceu.c b/drivers/media/platform/renesas-ceu.c
index 22330c0c2f6a..eccd60a7ebec 100644
--- a/drivers/media/platform/renesas-ceu.c
+++ b/drivers/media/platform/renesas-ceu.c
@@ -984,7 +984,7 @@ static int ceu_init_mbus_fmt(struct ceu_device *ceudev)
 /*
  * ceu_runtime_resume() - soft-reset the interface and turn sensor power on.
  */
-static int ceu_runtime_resume(struct device *dev)
+static int __maybe_unused ceu_runtime_resume(struct device *dev)
 {
 	struct ceu_device *ceudev = dev_get_drvdata(dev);
 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
@@ -1000,7 +1000,7 @@ static int ceu_runtime_resume(struct device *dev)
  * ceu_runtime_suspend() - disable capture and interrupts and soft-reset.
  *			   Turn sensor power off.
  */
-static int ceu_runtime_suspend(struct device *dev)
+static int __maybe_unused ceu_runtime_suspend(struct device *dev)
 {
 	struct ceu_device *ceudev = dev_get_drvdata(dev);
 	struct v4l2_subdev *v4l2_sd = ceudev->sd->v4l2_sd;
-- 
2.9.0

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

* Re: [PATCH] media: renesas-ceu: mark PM functions as __maybe_unused
  2018-02-28 23:19 [PATCH] media: renesas-ceu: mark PM functions as __maybe_unused Arnd Bergmann
@ 2018-03-01  9:59 ` Simon Horman
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Horman @ 2018-03-01  9:59 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Jacopo Mondi, Mauro Carvalho Chehab, Miguel Ojeda, Hans Verkuil,
	linux-media, linux-renesas-soc, linux-kernel

On Thu, Mar 01, 2018 at 12:19:37AM +0100, Arnd Bergmann wrote:
> The PM runtime operations are unused when CONFIG_PM is disabled,
> leading to a harmless warning:
> 
> drivers/media/platform/renesas-ceu.c:1003:12: error: 'ceu_runtime_suspend' defined but not used [-Werror=unused-function]
>  static int ceu_runtime_suspend(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~~
> drivers/media/platform/renesas-ceu.c:987:12: error: 'ceu_runtime_resume' defined but not used [-Werror=unused-function]
>  static int ceu_runtime_resume(struct device *dev)
>             ^~~~~~~~~~~~~~~~~~
> 
> This adds a __maybe_unused annotation to shut up the warning.
> 
> Fixes: 32e5a70dc8f4 ("media: platform: Add Renesas CEU driver")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Reviewed-by: Simon Horman <horms+renesas@verge.net.au>

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

end of thread, other threads:[~2018-03-01  9:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-28 23:19 [PATCH] media: renesas-ceu: mark PM functions as __maybe_unused Arnd Bergmann
2018-03-01  9:59 ` Simon Horman

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).