All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] gpio: fix build error in include/asm-generic/gpio.h
@ 2011-10-21  1:38 Hamo
  2011-10-21 11:39 ` Arnd Bergmann
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Hamo @ 2011-10-21  1:38 UTC (permalink / raw)
  To: arnd; +Cc: linux-arch, linux-kernel

Should call the platform-specific __gpio_{get,set}_value
instead of generic gpio_{get,set}_value

Signed-off-by: Yang Bai <hamo.by@gmail.com>
---
 include/asm-generic/gpio.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
index d494001..6acff5d 100644
--- a/include/asm-generic/gpio.h
+++ b/include/asm-generic/gpio.h
@@ -220,13 +220,13 @@ static inline int gpio_cansleep(unsigned gpio)
 static inline int gpio_get_value_cansleep(unsigned gpio)
 {
 	might_sleep();
-	return gpio_get_value(gpio);
+	return __gpio_get_value(gpio);
 }

 static inline void gpio_set_value_cansleep(unsigned gpio, int value)
 {
 	might_sleep();
-	gpio_set_value(gpio, value);
+	__gpio_set_value(gpio, value);
 }

 #endif /* !CONFIG_GPIOLIB */
-- 
1.7.1

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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
  2011-10-21  1:38 [PATCH] gpio: fix build error in include/asm-generic/gpio.h Hamo
@ 2011-10-21 11:39 ` Arnd Bergmann
  2011-10-24 22:04   ` Grant Likely
  2011-10-24 22:06 ` Grant Likely
  2011-11-02 20:16 ` Mike Frysinger
  2 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2011-10-21 11:39 UTC (permalink / raw)
  To: Hamo; +Cc: linux-arch, linux-kernel, Grant Likely

On Friday 21 October 2011, Hamo wrote:
> Should call the platform-specific __gpio_{get,set}_value
> instead of generic gpio_{get,set}_value
> 
> Signed-off-by: Yang Bai <hamo.by@gmail.com>
> ---
>  include/asm-generic/gpio.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)

Acked-by: Arnd Bergmann <arnd@arndb.de>

Grant, can you put that into the gpio tree?

> diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
> index d494001..6acff5d 100644
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
> @@ -220,13 +220,13 @@ static inline int gpio_cansleep(unsigned gpio)
>  static inline int gpio_get_value_cansleep(unsigned gpio)
>  {
>  	might_sleep();
> -	return gpio_get_value(gpio);
> +	return __gpio_get_value(gpio);
>  }
> 
>  static inline void gpio_set_value_cansleep(unsigned gpio, int value)
>  {
>  	might_sleep();
> -	gpio_set_value(gpio, value);
> +	__gpio_set_value(gpio, value);
>  }
> 
>  #endif /* !CONFIG_GPIOLIB */
> -- 
> 1.7.1
> 


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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
  2011-10-21 11:39 ` Arnd Bergmann
@ 2011-10-24 22:04   ` Grant Likely
  2011-10-25 11:23     ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: Grant Likely @ 2011-10-24 22:04 UTC (permalink / raw)
  To: Arnd Bergmann; +Cc: Hamo, linux-arch, linux-kernel

On Fri, Oct 21, 2011 at 1:39 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Friday 21 October 2011, Hamo wrote:
>> Should call the platform-specific __gpio_{get,set}_value
>> instead of generic gpio_{get,set}_value
>>
>> Signed-off-by: Yang Bai <hamo.by@gmail.com>
>> ---
>>  include/asm-generic/gpio.h |    4 ++--
>>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> Acked-by: Arnd Bergmann <arnd@arndb.de>
>
> Grant, can you put that into the gpio tree?

I can.

Hamo, next time make sure you cc: the relevant subsystem maintainer
(in this case, me) when submitting patches.  You can find the
maintainer by using ./scripts/get_maintainer.pl, or by looking at the
MAINTAINERS file.  It is more work for me when I don't receive the
patch directly in my inbox.

g.

>
>> diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
>> index d494001..6acff5d 100644
>> --- a/include/asm-generic/gpio.h
>> +++ b/include/asm-generic/gpio.h
>> @@ -220,13 +220,13 @@ static inline int gpio_cansleep(unsigned gpio)
>>  static inline int gpio_get_value_cansleep(unsigned gpio)
>>  {
>>       might_sleep();
>> -     return gpio_get_value(gpio);
>> +     return __gpio_get_value(gpio);
>>  }
>>
>>  static inline void gpio_set_value_cansleep(unsigned gpio, int value)
>>  {
>>       might_sleep();
>> -     gpio_set_value(gpio, value);
>> +     __gpio_set_value(gpio, value);
>>  }
>>
>>  #endif /* !CONFIG_GPIOLIB */
>> --
>> 1.7.1
>>
>
>



-- 
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
  2011-10-21  1:38 [PATCH] gpio: fix build error in include/asm-generic/gpio.h Hamo
  2011-10-21 11:39 ` Arnd Bergmann
@ 2011-10-24 22:06 ` Grant Likely
  2011-11-02 20:16 ` Mike Frysinger
  2 siblings, 0 replies; 7+ messages in thread
From: Grant Likely @ 2011-10-24 22:06 UTC (permalink / raw)
  To: Hamo; +Cc: arnd, linux-arch, linux-kernel, stable

On Fri, Oct 21, 2011 at 09:38:32AM +0800, Hamo wrote:
> Should call the platform-specific __gpio_{get,set}_value
> instead of generic gpio_{get,set}_value
> 
> Signed-off-by: Yang Bai <hamo.by@gmail.com>

Applied, thanks.

> ---
>  include/asm-generic/gpio.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/asm-generic/gpio.h b/include/asm-generic/gpio.h
> index d494001..6acff5d 100644
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
> @@ -220,13 +220,13 @@ static inline int gpio_cansleep(unsigned gpio)
>  static inline int gpio_get_value_cansleep(unsigned gpio)
>  {
>  	might_sleep();
> -	return gpio_get_value(gpio);
> +	return __gpio_get_value(gpio);
>  }
> 
>  static inline void gpio_set_value_cansleep(unsigned gpio, int value)
>  {
>  	might_sleep();
> -	gpio_set_value(gpio, value);
> +	__gpio_set_value(gpio, value);
>  }
> 
>  #endif /* !CONFIG_GPIOLIB */
> -- 
> 1.7.1
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
  2011-10-24 22:04   ` Grant Likely
@ 2011-10-25 11:23     ` Arnd Bergmann
       [not found]       ` <CACxGe6v9ZsK9KqUyZR76b0n3pTs6ykkQUJ6UtWooH9QvoFi16A@mail.gmail.com>
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2011-10-25 11:23 UTC (permalink / raw)
  To: Grant Likely; +Cc: Hamo, linux-arch, linux-kernel

On Tuesday 25 October 2011, Grant Likely wrote:
> by: Arnd Bergmann <arnd@arndb.de>
> >
> > Grant, can you put that into the gpio tree?
> 
> I can.
> 
> Hamo, next time make sure you cc: the relevant subsystem maintainer
> (in this case, me) when submitting patches.  You can find the
> maintainer by using ./scripts/get_maintainer.pl, or by looking at the
> MAINTAINERS file.  It is more work for me when I don't receive the
> patch directly in my inbox.

I would assume that this is what Hamo did:

$ ./scripts/get_maintainer.pl -f include/asm-generic/gpio.h 
Arnd Bergmann <arnd@arndb.de> (maintainer:GENERIC INCLUDE/A...)
linux-arch@vger.kernel.org (open list:GENERIC INCLUDE/A...)
linux-kernel@vger.kernel.org (open list)

	Arnd

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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
       [not found]       ` <CACxGe6v9ZsK9KqUyZR76b0n3pTs6ykkQUJ6UtWooH9QvoFi16A@mail.gmail.com>
@ 2011-10-26  1:36         ` Hamo
  0 siblings, 0 replies; 7+ messages in thread
From: Hamo @ 2011-10-26  1:36 UTC (permalink / raw)
  To: Grant Likely; +Cc: Arnd Bergmann, linux-arch, linux-kernel

On Tue, Oct 25, 2011 at 7:41 PM, Grant Likely <grant.likely@secretlab.ca> wrote:
>
> On Oct 25, 2011 1:23 PM, "Arnd Bergmann" <arnd@arndb.de> wrote:
>> I would assume that this is what Hamo did:
>>
>> $ ./scripts/get_maintainer.pl -f include/asm-generic/gpio.h
>> Arnd Bergmann <arnd@arndb.de> (maintainer:GENERIC INCLUDE/A...)
>> linux-arch@vger.kernel.org (open list:GENERIC INCLUDE/A...)
>> linux-kernel@vger.kernel.org (open list)
>
> Hmmm, looks like MAINTAINERS needs an update. Gpio should have been picked
> up.
>
> Sorry Hamo.
>
> g.
>
>>
>>        Arnd

Just found your emails.  Yes I used the script. I have sent a patch to
update MAINTAINERS and cc to you Grant.

Thanks,
Yang

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

* Re: [PATCH] gpio: fix build error in include/asm-generic/gpio.h
  2011-10-21  1:38 [PATCH] gpio: fix build error in include/asm-generic/gpio.h Hamo
  2011-10-21 11:39 ` Arnd Bergmann
  2011-10-24 22:06 ` Grant Likely
@ 2011-11-02 20:16 ` Mike Frysinger
  2 siblings, 0 replies; 7+ messages in thread
From: Mike Frysinger @ 2011-11-02 20:16 UTC (permalink / raw)
  To: Hamo; +Cc: arnd, linux-arch, linux-kernel, Grant Likely

On Thu, Oct 20, 2011 at 21:38, Hamo wrote:
> Should call the platform-specific __gpio_{get,set}_value
> instead of generic gpio_{get,set}_value
>
> --- a/include/asm-generic/gpio.h
> +++ b/include/asm-generic/gpio.h
>
>  static inline int gpio_get_value_cansleep(unsigned gpio)
>  {
>        might_sleep();
> -       return gpio_get_value(gpio);
> +       return __gpio_get_value(gpio);
>  }
>
>  static inline void gpio_set_value_cansleep(unsigned gpio, int value)
>  {
>        might_sleep();
> -       gpio_set_value(gpio, value);
> +       __gpio_set_value(gpio, value);
>  }

your change log says very little, and this change looks incorrect to
me.  __gpio_xxx type funcs exist in the GPIOLIB case, not in the
!GPIOLIB case.  your patch is changing the !GPIOLIB case.  so i don't
see how this could work: you're now calling funcs which are not
guaranteed to exist.

i notice this because i'm seeing build failures for somethings that
are using asm-generic/gpio.h, but not GPIOLIB.

so could you explain why exactly you need this and why you think this
is the right route to go ?
-mike

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

end of thread, other threads:[~2011-11-02 20:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-21  1:38 [PATCH] gpio: fix build error in include/asm-generic/gpio.h Hamo
2011-10-21 11:39 ` Arnd Bergmann
2011-10-24 22:04   ` Grant Likely
2011-10-25 11:23     ` Arnd Bergmann
     [not found]       ` <CACxGe6v9ZsK9KqUyZR76b0n3pTs6ykkQUJ6UtWooH9QvoFi16A@mail.gmail.com>
2011-10-26  1:36         ` Hamo
2011-10-24 22:06 ` Grant Likely
2011-11-02 20:16 ` Mike Frysinger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.