gpiolib: add missing declarations
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
@@ -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
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 3 lines
Signed-off-by Alexandre Courbot <[email protected]>Reported-by Stephen Warren <[email protected]>
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?
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).
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.
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
@@ -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
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: 'structof_phandle_args' declared inside parameter listinclude/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.
Signed-off-by Alexandre Courbot <[email protected]>Reported-by Stephen Warren <[email protected]>Reviewed-by Mika Westerberg <[email protected]>
Patch applied for fixes.
Yours,
Linus Walleij