Skip to contentSkip to conversation

gpiolib: add missing declarations

PATCH Superseded Alexandre Courbot 4 participants 7 messages Nov 23, 2013 – Nov 28, 2013 GPIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gpiolib: add missing declarations

Add missing declarations and include files to avoid warnings during compilation of include/gpio/driver.h.

---
 include/linux/gpio/driver.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/gpio/driver.h +3 -0
index 82eac61..3ea2cf6 100644
@@ -2,9 +2,12 @@
 #define __LINUX_GPIO_DRIVER_H
 
 #include <linux/types.h>
+#include <linux/module.h>
 
 struct device;
 struct gpio_desc;
+struct of_phandle_args;
+struct device_node;
 struct seq_file;
 
 /**
Signature · 1 line
1.8.4.2
#2 lore raw
Quoted 5 lines · Mika Westerberg
Quoted 2 lines · Alexandre Courbot

Add missing declarations and include files to avoid warnings during compilation of include/gpio/driver.h.

It would be good to have those warnings included in the changelog as well.

As in, copy-pasting the compiler's output? Isn't the change explicit enough?

#3 lore raw
Quoted 9 lines · Alexandre Courbot
Quoted 5 lines · Mika Westerberg
Quoted 2 lines · Alexandre Courbot

Add missing declarations and include files to avoid warnings during compilation of include/gpio/driver.h.

It would be good to have those warnings included in the changelog as well.

As in, copy-pasting the compiler's output? Isn't the change explicit enough?

If you just do 'git log' you can't see the change itself and that's where the changelog should help. If I see some warnings when I build the kernel, the first thing I usually do is to check 'git log' against linux-next and see if someone has already fixed that warning (grepping the warning message from changelog).

#4 lore raw
Quoted 9 lines · Mika Westerberg
Quoted 8 lines · Alexandre Courbot
Quoted 5 lines · Mika Westerberg
Quoted 2 lines · Alexandre Courbot

Add missing declarations and include files to avoid warnings during compilation of include/gpio/driver.h.

It would be good to have those warnings included in the changelog as well.

Quoted 7 lines
Quoted 1 line

As in, copy-pasting the compiler's output? Isn't the change explicit enough?

If you just do 'git log' you can't see the change itself and that's where the changelog should help. If I see some warnings when I build the kernel, the first thing I usually do is to check 'git log' against linux-next and see if someone has already fixed that warning (grepping the warning message from changelog).

Ah, I can see several examples of what you mention indeed. Will add these and send a v2.

#5 lore raw

PATCH v2 1/1 gpiolib: add missing declarations

Add declaration of 'struct of_phandle_args' to avoid the following warning:

In file included from arch/arm/mach-tegra/board-paz00.c:21:0:
include/linux/gpio/driver.h:102:17: warning: 'struct of_phandle_args' declared inside parameter list include/linux/gpio/driver.h:102:17: warning: its scope is only this definition or declaration, which is probably not what you want

Also proactively add other definitions/includes that could be missing in other contexts.

---
 include/linux/gpio/driver.h | 3 +++
 1 file changed, 3 insertions(+)
include/linux/gpio/driver.h +3 -0
index 82eac610ce1a..3ea2cf6b0e6c 100644
@@ -2,9 +2,12 @@
 #define __LINUX_GPIO_DRIVER_H
 
 #include <linux/types.h>
+#include <linux/module.h>
 
 struct device;
 struct gpio_desc;
+struct of_phandle_args;
+struct device_node;
 struct seq_file;
 
 /**
Signature · 1 line
1.8.4.2
#6 lore raw
Quoted 7 lines · Alexandre Courbot

Add declaration of 'struct of_phandle_args' to avoid the following warning:

In file included from arch/arm/mach-tegra/board-paz00.c:21:0:
include/linux/gpio/driver.h:102:17: warning: 'struct of_phandle_args' declared inside parameter list include/linux/gpio/driver.h:102:17: warning: its scope is only this definition or declaration, which is probably not what you want

Quoted 6 lines

Also proactively add other definitions/includes that could be missing in other contexts.

Patch applied for fixes.

Yours,
Linus Walleij