Skip to contentSkip to conversation

gpiolib: add missing include

PATCH In review Bartosz Golaszewski 3 participants 6 messages Jul 5, 2023 – Jul 6, 2023 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: add missing include

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

---
 drivers/gpio/gpiolib.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpiolib.h +1 -0
index cca81375f127..1409d52487c0 100644
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/notifier.h>
 #include <linux/cdev.h>
 #include <linux/rwsem.h>
 
Signature · 1 line
2.39.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

Fair enough.

Same is true for gpiolib-cdev, btw.
You want to touch that one up as well?

Cheers,
Kent.

Quoted 20 lines
---
 drivers/gpio/gpiolib.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpiolib.h +1 -0
index cca81375f127..1409d52487c0 100644
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/notifier.h>
 #include <linux/cdev.h>
 #include <linux/rwsem.h>
 
Signature · 1 line
2.39.2
#2 lore raw
Quoted 7 lines · Kent Gibson
Quoted 4 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

Quoted 7 lines

Fair enough.

Same is true for gpiolib-cdev, btw.
You want to touch that one up as well?

No, it already includes gpiolib.h.

Bart

Quoted 23 lines

Cheers,
Kent.

Quoted 20 lines
---
 drivers/gpio/gpiolib.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpiolib.h +1 -1
index cca81375f127..1409d52487c0 100644
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/notifier.h>
 #include <linux/cdev.h>
 #include <linux/rwsem.h>
 
--

2.39.2

#3 lore raw
Quoted 10 lines · Bartosz Golaszewski
Quoted 9 lines · Kent Gibson
Quoted 4 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

Fair enough.

Quoted 8 lines
Quoted 5 lines

Same is true for gpiolib-cdev, btw.
You want to touch that one up as well?

No, it already includes gpiolib.h.

Yeah, but that is indirect, and gpiolib-cdev.c uses struct notifier_block directly. Doesn't that warrant an explicit include?

Cheers,
Kent.

#4 lore raw
Quoted 18 lines · Kent Gibson
Quoted 16 lines · Bartosz Golaszewski
Quoted 14 lines · Kent Gibson
Quoted 4 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

Fair enough.

Same is true for gpiolib-cdev, btw.
You want to touch that one up as well?

Quoted 8 lines
Quoted 2 lines

No, it already includes gpiolib.h.

Yeah, but that is indirect, and gpiolib-cdev.c uses struct notifier_block directly. Doesn't that warrant an explicit include?

Cheers,
Kent.

Then gpiolib.c would need one too. IMO it's fine to just have it in gpiolib.h. It's a gpio-local header included by all core .c files.

Bart

Reviewed-by on v1 1/1
#5 lore raw
In reply to Bartosz Golaszewski
Quoted 3 lines · Bartosz Golaszewski

From: Bartosz Golaszewski <[email protected]>

gpiolib.h uses notifiers but doesn't include <linux/notifier.h>.

Quoted 10 lines
---
 drivers/gpio/gpiolib.h | 1 +
 1 file changed, 1 insertion(+)
drivers/gpio/gpiolib.h +0 -0
index cca81375f127..1409d52487c0 100644

drivers/gpio/gpiolib.h line 19

Quoted 6 lines
drivers/gpio/gpiolib.h +1 -0
@@ -14,6 +14,7 @@
 #include <linux/err.h>
 #include <linux/device.h>
 #include <linux/module.h>
+#include <linux/notifier.h>
 #include <linux/cdev.h>
 #include <linux/rwsem.h>

Can you also sort them (maybe in a separate change)?

Signature · 2 lines
With Best Regards,
Andy Shevchenko