Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433792 > unrolled thread

[PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused

Started byArnd Bergmann <arnd@arndb.de>
First post2016-06-29 16:30 +0200
Last post2016-06-29 16:30 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-06-29 16:30 +0200
    [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency Arnd Bergmann <arnd@arndb.de> - 2016-06-29 16:30 +0200

#1433792 — [PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-29 16:30 +0200
Subject[PATCH 1/3] [media] s5p_cec: mark suspend/resume as __maybe_unused
Message-ID<rPoF4-5hL-5@gated-at.bofh.it>
The suspend/resume functions in the s5p-cec driver are only
referenced when CONFIG_PM is enabled, so we get a warning
about unused functions otherwise:

drivers/staging/media/s5p-cec/s5p_cec.c:260:12: error: 's5p_cec_resume' defined but not used [-Werror=unused-function]
 static int s5p_cec_resume(struct device *dev)
            ^~~~~~~~~~~~~~
drivers/staging/media/s5p-cec/s5p_cec.c:253:12: error: 's5p_cec_suspend' defined but not used [-Werror=unused-function]
 static int s5p_cec_suspend(struct device *dev)

This marks them as __maybe_unused to avoid the warning without
having to introduce an extra #ifdef.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/staging/media/s5p-cec/s5p_cec.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/media/s5p-cec/s5p_cec.c b/drivers/staging/media/s5p-cec/s5p_cec.c
index f90b7c4e48fe..78333273c4e5 100644
--- a/drivers/staging/media/s5p-cec/s5p_cec.c
+++ b/drivers/staging/media/s5p-cec/s5p_cec.c
@@ -250,14 +250,14 @@ static int s5p_cec_runtime_resume(struct device *dev)
 	return 0;
 }
 
-static int s5p_cec_suspend(struct device *dev)
+static int __maybe_unused s5p_cec_suspend(struct device *dev)
 {
 	if (pm_runtime_suspended(dev))
 		return 0;
 	return s5p_cec_runtime_suspend(dev);
 }
 
-static int s5p_cec_resume(struct device *dev)
+static int __maybe_unused s5p_cec_resume(struct device *dev)
 {
 	if (pm_runtime_suspended(dev))
 		return 0;
-- 
2.9.0

[toc] | [next] | [standalone]


#1433795 — [PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency

FromArnd Bergmann <arnd@arndb.de>
Date2016-06-29 16:30 +0200
Subject[PATCH 2/3] [media] cec: add MEDIA_SUPPORT dependency
Message-ID<rPoF4-5hL-13@gated-at.bofh.it>
In reply to#1433792
The MEDIA_CEC_EDID option is guarded by MEDIA_SUPPORT, so selecting
it from MEDIA_CEC produces a warning:

warning: (MEDIA_CEC) selects MEDIA_CEC_EDID which has unmet direct dependencies (MEDIA_SUPPORT)

The warning is harmless, but it's better to add an explicit
dependency to shut it up, to reduce the noise during randconfig
builds.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ca684386e6e2 ("[media] cec: add HDMI CEC framework (api)")
---
 drivers/staging/media/cec/Kconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/media/cec/Kconfig b/drivers/staging/media/cec/Kconfig
index 8a7aceeac815..cd523590ea6f 100644
--- a/drivers/staging/media/cec/Kconfig
+++ b/drivers/staging/media/cec/Kconfig
@@ -1,5 +1,6 @@
 config MEDIA_CEC
 	tristate "CEC API (EXPERIMENTAL)"
+	depends on MEDIA_SUPPORT
 	select MEDIA_CEC_EDID
 	---help---
 	  Enable the CEC API.
-- 
2.9.0

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web