linux-kernel.vger.kernel.org archive mirror
 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 related	[flat|nested] 2+ messages in thread

* RE: [PATCH] media: staging/intel-ipu3: mark PM function as __maybe_unused
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Cao, Bingbu @ 2019-03-05  0:09 UTC (permalink / raw)
  To: Arnd Bergmann, Sakari Ailus, Mauro Carvalho Chehab, Greg Kroah-Hartman
  Cc: Zhi, Yong, Tomasz Figa, Qiu, Tian Shu, linux-media, devel, linux-kernel

Hi, Bergmann,

Thanks for your patch.
Reviewed-by: Cao, Bingbu <bingbu.cao@intel.com>

__________________________
BRs,
Cao, Bingbu


> -----Original Message-----
> From: Arnd Bergmann [mailto:arnd@arndb.de]
> Sent: Tuesday, March 5, 2019 4:29 AM
> To: Sakari Ailus <sakari.ailus@linux.intel.com>; Mauro Carvalho Chehab
> <mchehab@kernel.org>; Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Arnd Bergmann <arnd@arndb.de>; Zhi, Yong <yong.zhi@intel.com>;
> Tomasz Figa <tfiga@chromium.org>; Qiu, Tian Shu
> <tian.shu.qiu@intel.com>; Cao, Bingbu <bingbu.cao@intel.com>; linux-
> media@vger.kernel.org; devel@driverdev.osuosl.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] media: staging/intel-ipu3: mark PM function as
> __maybe_unused
> 
> 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;
as well as URLs for NNTP newsgroup(s).