public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include
@ 2019-03-12 11:26 Valdis Klētnieks
  2019-03-12 22:46 ` Pali Rohár
  0 siblings, 1 reply; 4+ messages in thread
From: Valdis Klētnieks @ 2019-03-12 11:26 UTC (permalink / raw)
  To: pali.rohar, Darren Hart; +Cc: platform-driver-x86, linux-kernel

Building with W=1 complains:
  CC [M]  drivers/platform/x86/dell-rbtn.o
drivers/platform/x86/dell-rbtn.c:345:5: warning: no previous prototype for 'dell_rbtn_notifier_register' [-Wmissing-prototypes]
  345 | int dell_rbtn_notifier_register(struct notifier_block *nb)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/platform/x86/dell-rbtn.c:371:5: warning: no previous prototype for 'dell_rbtn_notifier_unregister' [-Wmissing-prototypes]
  371 | int dell_rbtn_notifier_unregister(struct notifier_block *nb)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>

diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c
index f3afe778001e..d50ca96d99f0 100644
--- a/drivers/platform/x86/dell-rbtn.c
+++ b/drivers/platform/x86/dell-rbtn.c
@@ -17,6 +17,7 @@
 #include <linux/acpi.h>
 #include <linux/rfkill.h>
 #include <linux/input.h>
+#include "dell-rbtn.h"
 
 enum rbtn_type {
 	RBTN_UNKNOWN,


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include
  2019-03-12 11:26 [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include Valdis Klētnieks
@ 2019-03-12 22:46 ` Pali Rohár
  2019-03-12 22:53   ` valdis.kletnieks
  2019-04-05 14:04   ` Andy Shevchenko
  0 siblings, 2 replies; 4+ messages in thread
From: Pali Rohár @ 2019-03-12 22:46 UTC (permalink / raw)
  To: Valdis Klētnieks; +Cc: Darren Hart, platform-driver-x86, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1360 bytes --]

On Tuesday 12 March 2019 07:26:06 Valdis Klētnieks wrote:
> Building with W=1 complains:
>   CC [M]  drivers/platform/x86/dell-rbtn.o
> drivers/platform/x86/dell-rbtn.c:345:5: warning: no previous prototype for 'dell_rbtn_notifier_register' [-Wmissing-prototypes]
>   345 | int dell_rbtn_notifier_register(struct notifier_block *nb)
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> drivers/platform/x86/dell-rbtn.c:371:5: warning: no previous prototype for 'dell_rbtn_notifier_unregister' [-Wmissing-prototypes]
>   371 | int dell_rbtn_notifier_unregister(struct notifier_block *nb)
>       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Can you identify in which commit was introduced this problem? If yes,
then Fixes: keyword should be added into commit message.

>  
> The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync
> 
> Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
> 
> diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c
> index f3afe778001e..d50ca96d99f0 100644
> --- a/drivers/platform/x86/dell-rbtn.c
> +++ b/drivers/platform/x86/dell-rbtn.c
> @@ -17,6 +17,7 @@
>  #include <linux/acpi.h>
>  #include <linux/rfkill.h>
>  #include <linux/input.h>
> +#include "dell-rbtn.h"
>  
>  enum rbtn_type {
>  	RBTN_UNKNOWN,
> 

-- 
Pali Rohár
pali.rohar@gmail.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include
  2019-03-12 22:46 ` Pali Rohár
@ 2019-03-12 22:53   ` valdis.kletnieks
  2019-04-05 14:04   ` Andy Shevchenko
  1 sibling, 0 replies; 4+ messages in thread
From: valdis.kletnieks @ 2019-03-12 22:53 UTC (permalink / raw)
  To: Pali Rohár; +Cc: Darren Hart, platform-driver-x86, linux-kernel

On Tue, 12 Mar 2019 23:46:11 +0100, Pali Rohar said:

> Can you identify in which commit was introduced this problem? If yes,
> then Fixes: keyword should be added into commit message.

I admit not knowing how long that's been there - I mostly found myself
with a large amount of free time, a good supply of caffeine, and I got
irritated with how many warnings 'make C=2 W=1' throws, so I decided
to start going through and beating things into shape.  For those issues
where I can easily identify the regression point, I will include a Fixes: as I go..

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include
  2019-03-12 22:46 ` Pali Rohár
  2019-03-12 22:53   ` valdis.kletnieks
@ 2019-04-05 14:04   ` Andy Shevchenko
  1 sibling, 0 replies; 4+ messages in thread
From: Andy Shevchenko @ 2019-04-05 14:04 UTC (permalink / raw)
  To: Pali Rohár
  Cc: Valdis Klētnieks, Darren Hart, Platform Driver,
	Linux Kernel Mailing List

On Wed, Mar 13, 2019 at 12:46 AM Pali Rohár <pali.rohar@gmail.com> wrote:
>
> On Tuesday 12 March 2019 07:26:06 Valdis Klētnieks wrote:
> > Building with W=1 complains:
> >   CC [M]  drivers/platform/x86/dell-rbtn.o
> > drivers/platform/x86/dell-rbtn.c:345:5: warning: no previous prototype for 'dell_rbtn_notifier_register' [-Wmissing-prototypes]
> >   345 | int dell_rbtn_notifier_register(struct notifier_block *nb)
> >       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> > drivers/platform/x86/dell-rbtn.c:371:5: warning: no previous prototype for 'dell_rbtn_notifier_unregister' [-Wmissing-prototypes]
> >   371 | int dell_rbtn_notifier_unregister(struct notifier_block *nb)
> >       |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>
> Can you identify in which commit was introduced this problem? If yes,
> then Fixes: keyword should be added into commit message.
>

Pushed to my review and testing queue, thanks!

P.S. I have added Fixes tag.

> >
> > The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync
> >
> > Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
> >
> > diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c
> > index f3afe778001e..d50ca96d99f0 100644
> > --- a/drivers/platform/x86/dell-rbtn.c
> > +++ b/drivers/platform/x86/dell-rbtn.c
> > @@ -17,6 +17,7 @@
> >  #include <linux/acpi.h>
> >  #include <linux/rfkill.h>
> >  #include <linux/input.h>
> > +#include "dell-rbtn.h"
> >
> >  enum rbtn_type {
> >       RBTN_UNKNOWN,
> >
>
> --
> Pali Rohár
> pali.rohar@gmail.com



-- 
With Best Regards,
Andy Shevchenko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-04-05 14:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-03-12 11:26 [PATCH] drivers/platform/x86/dell-rbtn.c - add missing #include Valdis Klētnieks
2019-03-12 22:46 ` Pali Rohár
2019-03-12 22:53   ` valdis.kletnieks
2019-04-05 14:04   ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox