linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gpio: sa1100: include <mach/generic.h>
@ 2023-05-16 20:16 Arnd Bergmann
  2023-05-17  9:33 ` Bartosz Golaszewski
  0 siblings, 1 reply; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-16 20:16 UTC (permalink / raw)
  To: Linus Walleij, Bartosz Golaszewski
  Cc: Arnd Bergmann, linux-gpio, linux-kernel

From: Arnd Bergmann <arnd@arndb.de>

sa1100_init_gpio() is declared in a machine specific header so it
can be called from platform code, but the definition is in the device
driver, which causes a warning:

drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes]

It's already possible to include mach/generic.h from drivers, so add
this one here as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/gpio/gpio-sa1100.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
index 342a59ea489a..3b1cc8462fcb 100644
--- a/drivers/gpio/gpio-sa1100.c
+++ b/drivers/gpio/gpio-sa1100.c
@@ -13,6 +13,7 @@
 #include <mach/hardware.h>
 #include <mach/regs-gpio.h>
 #include <mach/irqs.h>
+#include <mach/generic.h>
 
 struct sa1100_gpio_chip {
 	struct gpio_chip chip;
-- 
2.39.2


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

* Re: [PATCH] gpio: sa1100: include <mach/generic.h>
  2023-05-16 20:16 [PATCH] gpio: sa1100: include <mach/generic.h> Arnd Bergmann
@ 2023-05-17  9:33 ` Bartosz Golaszewski
  2023-05-17  9:51   ` Arnd Bergmann
  0 siblings, 1 reply; 3+ messages in thread
From: Bartosz Golaszewski @ 2023-05-17  9:33 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Linus Walleij, Arnd Bergmann, linux-gpio, linux-kernel

On Tue, May 16, 2023 at 10:16 PM Arnd Bergmann <arnd@kernel.org> wrote:
>
> From: Arnd Bergmann <arnd@arndb.de>
>
> sa1100_init_gpio() is declared in a machine specific header so it
> can be called from platform code, but the definition is in the device
> driver, which causes a warning:
>
> drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes]
>
> It's already possible to include mach/generic.h from drivers, so add
> this one here as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/gpio/gpio-sa1100.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
> index 342a59ea489a..3b1cc8462fcb 100644
> --- a/drivers/gpio/gpio-sa1100.c
> +++ b/drivers/gpio/gpio-sa1100.c
> @@ -13,6 +13,7 @@
>  #include <mach/hardware.h>
>  #include <mach/regs-gpio.h>

This doesn't apply on top of my branch (neither on next) because of
this line. I can't see where this was added. Any hint?

Bart

>  #include <mach/irqs.h>
> +#include <mach/generic.h>
>
>  struct sa1100_gpio_chip {
>         struct gpio_chip chip;
> --
> 2.39.2
>

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

* Re: [PATCH] gpio: sa1100: include <mach/generic.h>
  2023-05-17  9:33 ` Bartosz Golaszewski
@ 2023-05-17  9:51   ` Arnd Bergmann
  0 siblings, 0 replies; 3+ messages in thread
From: Arnd Bergmann @ 2023-05-17  9:51 UTC (permalink / raw)
  To: Bartosz Golaszewski, Arnd Bergmann
  Cc: Linus Walleij, open list:GPIO SUBSYSTEM, linux-kernel

On Wed, May 17, 2023, at 11:33, Bartosz Golaszewski wrote:
> On Tue, May 16, 2023 at 10:16 PM Arnd Bergmann <arnd@kernel.org> wrote:
>>
>> From: Arnd Bergmann <arnd@arndb.de>
>>
>> sa1100_init_gpio() is declared in a machine specific header so it
>> can be called from platform code, but the definition is in the device
>> driver, which causes a warning:
>>
>> drivers/gpio/gpio-sa1100.c:310:13: error: no previous prototype for 'sa1100_init_gpio' [-Werror=missing-prototypes]
>>
>> It's already possible to include mach/generic.h from drivers, so add
>> this one here as well.
>>
>> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
>> ---
>>  drivers/gpio/gpio-sa1100.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/gpio/gpio-sa1100.c b/drivers/gpio/gpio-sa1100.c
>> index 342a59ea489a..3b1cc8462fcb 100644
>> --- a/drivers/gpio/gpio-sa1100.c
>> +++ b/drivers/gpio/gpio-sa1100.c
>> @@ -13,6 +13,7 @@
>>  #include <mach/hardware.h>
>>  #include <mach/regs-gpio.h>
>
> This doesn't apply on top of my branch (neither on next) because of
> this line. I can't see where this was added. Any hint?

My mistake, my working tree had some experimental patches in it.

I'll send a v2.

    Arnd

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

end of thread, other threads:[~2023-05-17  9:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-16 20:16 [PATCH] gpio: sa1100: include <mach/generic.h> Arnd Bergmann
2023-05-17  9:33 ` Bartosz Golaszewski
2023-05-17  9:51   ` Arnd Bergmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).