Skip to contentSkip to conversation

media: marvell-ccic: mmp: mark PM functions as __maybe_unused

PATCH In review Wei Yongjun 2 participants 2 messages Sep 9, 2020 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: marvell-ccic: mmp: mark PM functions as __maybe_unused

The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings:

drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning:
'mmpcam_resume' defined but not used [-Wunused-function]
347 | static int mmpcam_resume(struct device *dev)

      |            ^~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning:
 'mmpcam_suspend' defined but not used [-Wunused-function]
  338 | static int mmpcam_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~
Fixes 55cd34524aa3 ("media: marvell-ccic: add support for runtime PM")
---
 drivers/media/platform/marvell-ccic/mmp-driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/marvell-ccic/mmp-driver.c +2 -2
index c4b28a00a3a2..cd902b180669 100644
@@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_suspend(struct device *dev)
+static int __maybe_unused mmpcam_suspend(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 
@@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_resume(struct device *dev)
+static int __maybe_unused mmpcam_resume(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 
Acked-by on v1 1/1
#1 lore raw
Quoted 13 lines · Wei Yongjun

The suspend/resume functions have no callers depending on configuration, so they must be marked __maybe_unused to avoid these harmless warnings:

drivers/media/platform/marvell-ccic/mmp-driver.c:347:12: warning:
'mmpcam_resume' defined but not used [-Wunused-function]
347 | static int mmpcam_resume(struct device *dev)

      |            ^~~~~~~~~~~~~
drivers/media/platform/marvell-ccic/mmp-driver.c:338:12: warning:
 'mmpcam_suspend' defined but not used [-Wunused-function]
  338 | static int mmpcam_suspend(struct device *dev)
      |            ^~~~~~~~~~~~~~
Quoted 3 lines
Fixes 55cd34524aa3 ("media: marvell-ccic: add support for runtime PM")

Thank you!
Lubo

Quoted 27 lines
---
 drivers/media/platform/marvell-ccic/mmp-driver.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/media/platform/marvell-ccic/mmp-driver.c +2 -2
index c4b28a00a3a2..cd902b180669 100644
@@ -335,7 +335,7 @@ static int mmpcam_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_suspend(struct device *dev)
+static int __maybe_unused mmpcam_suspend(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);
 
@@ -344,7 +344,7 @@ static int mmpcam_suspend(struct device *dev)
 	return 0;
 }
 
-static int mmpcam_resume(struct device *dev)
+static int __maybe_unused mmpcam_resume(struct device *dev)
 {
 	struct mmp_camera *cam = dev_get_drvdata(dev);