mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused
@ 2019-03-04 20:29 Arnd Bergmann
  2019-03-05  0:09 ` Cao, Bingbu
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2019-03-04 20:29 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: Arnd Bergmann, Yong Zhi, Tomasz Figa, Tian Shu Qiu, Bingbu Cao,
	linux-media, devel, linux-kernel

The imgu_rpm_dummy_cb() looks like an API misuse that is explained
in the comment above it. Aside from that, it also causes a warning
when power management support is disabled:

drivers/staging/media/ipu3/ipu3.c:794:12: error: 'imgu_rpm_dummy_cb' defined but not used [-Werror=unused-function]

The warning is at least easy to fix by marking the function as
__maybe_unused.

Fixes: 7fc7af649ca7 ("media: staging/intel-ipu3: Add imgu top level pci device driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/media/ipu3/ipu3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/ipu3/ipu3.c b/drivers/staging/media/ipu3/ipu3.c
index d575ac78c8f0..d00d26264c37 100644
--- a/drivers/staging/media/ipu3/ipu3.c
+++ b/drivers/staging/media/ipu3/ipu3.c
@@ -791,7 +791,7 @@ static int __maybe_unused imgu_resume(struct device *dev)
  * PCI rpm framework checks the existence of driver rpm callbacks.
  * Place a dummy callback here to avoid rpm going into error state.
  */
-static int imgu_rpm_dummy_cb(struct device *dev)
+static __maybe_unused int imgu_rpm_dummy_cb(struct device *dev)
 {
 	return 0;
 }
-- 
2.20.0


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

end of thread, other threads:[~2019-03-05  0:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-04 20:29 [PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused Arnd Bergmann
2019-03-05  0:09 ` Cao, Bingbu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®