Skip to contentSkip to conversation

drivers/platform/x86/dell-rbtn.c - add missing #include

PATCH In review Valdis Kl=?utf-8?Q?=c4=93?=tnieks 3 participants 4 messages Mar 12, 2019 – Apr 5, 2019 x86 platform drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/platform/x86/dell-rbtn.c - add missing #include

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

drivers/platform/x86/dell-rbtn.c +1 -0
index f3afe778001e..d50ca96d99f0 100644
@@ -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,
#1 lore raw
Quoted 8 lines · 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.

Quoted 18 lines

The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync

drivers/platform/x86/dell-rbtn.c +1 -0
index f3afe778001e..d50ca96d99f0 100644
@@ -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,
Signature · 2 lines
Pali Rohár
[email protected]
#2 lore raw
Quoted 2 lines · Pali Rohar

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

#3 lore raw
In reply to Pali Rohár
Quoted 11 lines · Pali Rohár
Quoted 8 lines · 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)
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Quoted 3 lines

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.

Quoted 22 lines
Quoted 11 lines

The real problem is a missing include. Add it to keep dell-rbtn.c and .h in sync

drivers/platform/x86/dell-rbtn.c +0 -0
index f3afe778001e..d50ca96d99f0 100644

drivers/platform/x86/dell-rbtn.c line 23

Quoted 7 lines
drivers/platform/x86/dell-rbtn.c +1 -0
@@ -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
[email protected]

Signature · 2 lines
With Best Regards,
Andy Shevchenko