Skip to contentSkip to conversation

powercap: include header to fix -Wmissing-prototypes

PATCH Superseded Pujin Shi 1 participant 1 message Sep 21, 2020 Power management core

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Pujin Shi

author
#0 lore raw

PATCH v3 1/1 powercap: include header to fix -Wmissing-prototypes

Include the linux/idle_inject.h header to fix W=1 build warning:

drivers/powercap/idle_inject.c:152:6: warning: no previous prototype for ‘idle_inject_set_duration’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:167:6: warning: no previous prototype for ‘idle_inject_get_duration’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:179:6: warning: no previous prototype for ‘idle_inject_set_latency’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:195:5: warning: no previous prototype for ‘idle_inject_start’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:227:6: warning: no previous prototype for ‘idle_inject_stop’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:299:28: warning: no previous prototype for ‘idle_inject_register’ [-Wmissing-prototypes] drivers/powercap/idle_inject.c:345:6: warning: no previous prototype for ‘idle_inject_unregister’ [-Wmissing-prototypes]

---
 drivers/powercap/idle_inject.c | 1 +
 1 file changed, 1 insertion(+)
drivers/powercap/idle_inject.c +1 -0
index 4310901a074e..6e1a0043c411 100644
@@ -43,6 +43,7 @@
 #include <linux/sched.h>
 #include <linux/slab.h>
 #include <linux/smpboot.h>
+#include <linux/idle_inject.h>
 
 #include <uapi/linux/sched/types.h>
 
Signature · 1 line
2.25.4