Skip to contentSkip to conversation

bus: ti-sysc: mark PM functions as __maybe_unused

PATCH In review Arnd Bergmann 2 participants 2 messages Oct 13, 2017 OMAP2+ support

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 bus: ti-sysc: mark PM functions as __maybe_unused

The new bus driver causes a harmless compile-time warning when CONFIG_PM is disabled:

drivers/bus/ti-sysc.c:440:12: error: 'sysc_runtime_resume' defined but not used [-Werror=unused-function]
static int sysc_runtime_resume(struct device *dev)

            ^~~~~~~~~~~~~~~~~~~
drivers/bus/ti-sysc.c:421:12: error: 'sysc_runtime_suspend' defined but not used [-Werror=unused-function]
 static int sysc_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

This marks the two unused functions as __maybe_unused to shut up that warning.

Fixes 0eecc636e5a2 ("bus: ti-sysc: Add minimal TI sysc interconnect target driver")
---
 drivers/bus/ti-sysc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/bus/ti-sysc.c +2 -2
index 9b3cb278ce41..8b95d0f0c319 100644
@@ -418,7 +418,7 @@ static void sysc_show_registers(struct sysc *ddata)
 		buf);
 }
 
-static int sysc_runtime_suspend(struct device *dev)
+static int __maybe_unused sysc_runtime_suspend(struct device *dev)
 {
 	struct sysc *ddata;
 	int i;
@@ -437,7 +437,7 @@ static int sysc_runtime_suspend(struct device *dev)
 	return 0;
 }
 
-static int sysc_runtime_resume(struct device *dev)
+static int __maybe_unused sysc_runtime_resume(struct device *dev)
 {
 	struct sysc *ddata;
 	int i, error;
Signature · 1 line
2.9.0
maintainer
#1 lore raw
Quoted 5 lines · Arnd Bergmann

The new bus driver causes a harmless compile-time warning when CONFIG_PM is disabled:

drivers/bus/ti-sysc.c:440:12: error: 'sysc_runtime_resume' defined but not used [-Werror=unused-function]
static int sysc_runtime_resume(struct device *dev)

Quoted 7 lines
            ^~~~~~~~~~~~~~~~~~~
drivers/bus/ti-sysc.c:421:12: error: 'sysc_runtime_suspend' defined but not used [-Werror=unused-function]
 static int sysc_runtime_suspend(struct device *dev)
            ^~~~~~~~~~~~~~~~~~~~

This marks the two unused functions as __maybe_unused to shut up that warning.

Thanks applying into omap-for-v4.15/ti-sysc.

Regards,

Tony