diff mbox series

[v4] powercap: include header to fix -Wmissing-prototypes

Message ID 20200922044652.3393-1-shipujin.t@gmail.com
State Superseded
Headers show
Series [v4] powercap: include header to fix -Wmissing-prototypes | expand

Commit Message

Pujin Shi Sept. 22, 2020, 4:46 a.m. UTC
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]

Signed-off-by: Pujin Shi <shipj@lemote.com>
---
 drivers/powercap/idle_inject.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Rafael J. Wysocki Sept. 25, 2020, 2:49 p.m. UTC | #1
On Tue, Sep 22, 2020 at 6:47 AM Pujin Shi <shipujin.t@gmail.com> wrote:
>

> 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]

>

> Signed-off-by: Pujin Shi <shipj@lemote.com>

> ---

>  drivers/powercap/idle_inject.c | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c

> index 4310901a074e..6e1a0043c411 100644

> --- a/drivers/powercap/idle_inject.c

> +++ b/drivers/powercap/idle_inject.c

> @@ -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>

>

> --


Note that the contact information in the S-o-b tag should match the
From: header exactly.


I've fixed that up manually this time and applied the patch (as 5.10
material), but please be more careful about it in the future.

Thanks!
diff mbox series

Patch

diff --git a/drivers/powercap/idle_inject.c b/drivers/powercap/idle_inject.c
index 4310901a074e..6e1a0043c411 100644
--- a/drivers/powercap/idle_inject.c
+++ b/drivers/powercap/idle_inject.c
@@ -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>