* m68k build regression
@ 2013-04-05 10:39 Bityutskiy, Artem
2013-04-05 14:49 ` Linus Walleij
0 siblings, 1 reply; 6+ messages in thread
From: Bityutskiy, Artem @ 2013-04-05 10:39 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-m68k@lists.linux-m68k.org, Grant Likely, Linus Walleij
Hi,
starting from 3.9-rc1 one of my m68k configurations does not build,
which is a regression. The configuration is attached. I build with
W=1. I did not look at the details, just shooting a bug report.
drivers/gpio/devres.c: In function 'devm_gpio_request_one':
drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/gpio/devres.o] Error 1
Thanks!
--
Best Regards,
Artem Bityutskiy
---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki
This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: m68k build regression
2013-04-05 10:39 m68k build regression Bityutskiy, Artem
@ 2013-04-05 14:49 ` Linus Walleij
2013-04-05 17:20 ` Alex Courbot
0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2013-04-05 14:49 UTC (permalink / raw)
To: Bityutskiy, Artem, Alexandre Courbot
Cc: Geert Uytterhoeven, linux-m68k@lists.linux-m68k.org, Grant Likely
On Fri, Apr 5, 2013 at 12:39 PM, Bityutskiy, Artem
<artem.bityutskiy@intel.com> wrote:
> starting from 3.9-rc1 one of my m68k configurations does not build,
> which is a regression. The configuration is attached. I build with
> W=1. I did not look at the details, just shooting a bug report.
>
> drivers/gpio/devres.c: In function 'devm_gpio_request_one':
> drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
> cc1: some warnings being treated as errors
> make[3]: *** [drivers/gpio/devres.o] Error 1
Somehow GPIO_DEVRES get selected,
m68k is using GENERIC_GPIO but not GPIOLIB, so
devres.c include <linux/gpio.h> which includes <asm/gpio.h>
as the arch has CONFIG_ARCH_HAVE_CUSTOM_GPIO_H.
So to use the devres facility arch/m68k/include/asm/gpio.h
needs to provide gpio_request_one().
Which it doesn't and thus fails.
Did some driver you're using start to use
devm_gpio_request_one() recently?
I vaguely remember Alexandre looking into things like this
so adding him...
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: m68k build regression
2013-04-05 14:49 ` Linus Walleij
@ 2013-04-05 17:20 ` Alex Courbot
2013-04-08 4:32 ` Greg Ungerer
0 siblings, 1 reply; 6+ messages in thread
From: Alex Courbot @ 2013-04-05 17:20 UTC (permalink / raw)
To: Linus Walleij
Cc: Bityutskiy, Artem, Geert Uytterhoeven,
linux-m68k@lists.linux-m68k.org, Grant Likely, Jonas Bonn
On 04/05/2013 07:49 AM, Linus Walleij wrote:
> On Fri, Apr 5, 2013 at 12:39 PM, Bityutskiy, Artem
> <artem.bityutskiy@intel.com> wrote:
>
>> starting from 3.9-rc1 one of my m68k configurations does not build,
>> which is a regression. The configuration is attached. I build with
>> W=1. I did not look at the details, just shooting a bug report.
>>
>> drivers/gpio/devres.c: In function 'devm_gpio_request_one':
>> drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
>> cc1: some warnings being treated as errors
>> make[3]: *** [drivers/gpio/devres.o] Error 1
>
> Somehow GPIO_DEVRES get selected,
> m68k is using GENERIC_GPIO but not GPIOLIB, so
> devres.c include <linux/gpio.h> which includes <asm/gpio.h>
> as the arch has CONFIG_ARCH_HAVE_CUSTOM_GPIO_H.
>
> So to use the devres facility arch/m68k/include/asm/gpio.h
> needs to provide gpio_request_one().
>
> Which it doesn't and thus fails.
>
> Did some driver you're using start to use
> devm_gpio_request_one() recently?
>
> I vaguely remember Alexandre looking into things like this
> so adding him...
I know OpenRisc had an issue with devres.c (CC Jonas), please look at
commit d4cb776f for the fix. I don't think my changes for 3.9 are
responsible for this, they only deal with gpiolib's internals and not
with header files, so they should be noop for platforms only using
GENERIC_GPIO.
I'd recommend doing the same as OpenRisc (turning GENERIC_GPIO and
ARCH_WANT_OPTIONAL_GPIOLIB into ARCH_REQUIRE_GPIOLIB), anyway
GENERIC_GPIO is being removed for 3.10, so you better get used to using
gpiolib from now on. :)
Alex.
-----------------------------------------------------------------------------------
This email message is for the sole use of the intended recipient(s) and may contain
confidential information. Any unauthorized review, use, disclosure or distribution
is prohibited. If you are not the intended recipient, please contact the sender by
reply email and destroy all copies of the original message.
-----------------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: m68k build regression
2013-04-05 17:20 ` Alex Courbot
@ 2013-04-08 4:32 ` Greg Ungerer
2013-04-08 7:20 ` Linus Walleij
0 siblings, 1 reply; 6+ messages in thread
From: Greg Ungerer @ 2013-04-08 4:32 UTC (permalink / raw)
To: Alex Courbot
Cc: Linus Walleij, Bityutskiy, Artem, Geert Uytterhoeven,
linux-m68k@lists.linux-m68k.org, Grant Likely, Jonas Bonn
On 06/04/13 03:20, Alex Courbot wrote:
> On 04/05/2013 07:49 AM, Linus Walleij wrote:
>> On Fri, Apr 5, 2013 at 12:39 PM, Bityutskiy, Artem
>> <artem.bityutskiy@intel.com> wrote:
>>
>>> starting from 3.9-rc1 one of my m68k configurations does not build,
>>> which is a regression. The configuration is attached. I build with
>>> W=1. I did not look at the details, just shooting a bug report.
>>>
>>> drivers/gpio/devres.c: In function 'devm_gpio_request_one':
>>> drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
>>> cc1: some warnings being treated as errors
>>> make[3]: *** [drivers/gpio/devres.o] Error 1
>>
>> Somehow GPIO_DEVRES get selected,
>> m68k is using GENERIC_GPIO but not GPIOLIB, so
>> devres.c include <linux/gpio.h> which includes <asm/gpio.h>
>> as the arch has CONFIG_ARCH_HAVE_CUSTOM_GPIO_H.
>>
>> So to use the devres facility arch/m68k/include/asm/gpio.h
>> needs to provide gpio_request_one().
>>
>> Which it doesn't and thus fails.
>>
>> Did some driver you're using start to use
>> devm_gpio_request_one() recently?
>>
>> I vaguely remember Alexandre looking into things like this
>> so adding him...
>
> I know OpenRisc had an issue with devres.c (CC Jonas), please look at commit d4cb776f for the fix. I don't think my changes for 3.9 are responsible for this, they only deal with gpiolib's internals and not with header files, so they should be noop for platforms only using GENERIC_GPIO.
>
> I'd recommend doing the same as OpenRisc (turning GENERIC_GPIO and ARCH_WANT_OPTIONAL_GPIOLIB into ARCH_REQUIRE_GPIOLIB), anyway GENERIC_GPIO is being removed for 3.10, so you better get used to using gpiolib from now on. :)
Or we could fix like this, keeping the existing local functions
intact for this one last kernel version.
Regards
Greg
[PATCH] m68k: define a local gpio_request_one() function
Compiling for linux-3.9-rc1 and later fails with:
drivers/gpio/devres.c: In function 'devm_gpio_request_one':
drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
So provide a local gpio_request_one() function. Code largely borrowed from
blackfin's local gpio_request_one() function.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
---
arch/m68k/include/asm/gpio.h | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/arch/m68k/include/asm/gpio.h b/arch/m68k/include/asm/gpio.h
index 4395ffc..8cc8343 100644
--- a/arch/m68k/include/asm/gpio.h
+++ b/arch/m68k/include/asm/gpio.h
@@ -86,4 +86,24 @@ static inline int gpio_cansleep(unsigned gpio)
return gpio < MCFGPIO_PIN_MAX ? 0 : __gpio_cansleep(gpio);
}
+static inline int gpio_request_one(unsigned gpio, unsigned long flags, const char *label)
+{
+ int err;
+
+ err = gpio_request(gpio, label);
+ if (err)
+ return err;
+
+ if (flags & GPIOF_DIR_IN)
+ err = gpio_direction_input(gpio);
+ else
+ err = gpio_direction_output(gpio,
+ (flags & GPIOF_INIT_HIGH) ? 1 : 0);
+
+ if (err)
+ gpio_free(gpio);
+
+ return err;
+}
+
#endif
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: m68k build regression
2013-04-08 4:32 ` Greg Ungerer
@ 2013-04-08 7:20 ` Linus Walleij
2013-04-08 7:40 ` Greg Ungerer
0 siblings, 1 reply; 6+ messages in thread
From: Linus Walleij @ 2013-04-08 7:20 UTC (permalink / raw)
To: Greg Ungerer
Cc: Alex Courbot, Bityutskiy, Artem, Geert Uytterhoeven,
linux-m68k@lists.linux-m68k.org, Grant Likely, Jonas Bonn
On Mon, Apr 8, 2013 at 6:32 AM, Greg Ungerer <gregungerer@westnet.com.au> wrote:
> Or we could fix like this, keeping the existing local functions
> intact for this one last kernel version.
>
> Regards
> Greg
>
>
> [PATCH] m68k: define a local gpio_request_one() function
>
> Compiling for linux-3.9-rc1 and later fails with:
>
> drivers/gpio/devres.c: In function 'devm_gpio_request_one':
> drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
>
> So provide a local gpio_request_one() function. Code largely borrowed from
> blackfin's local gpio_request_one() function.
>
> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Greg, are you pushing this patch then?
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: m68k build regression
2013-04-08 7:20 ` Linus Walleij
@ 2013-04-08 7:40 ` Greg Ungerer
0 siblings, 0 replies; 6+ messages in thread
From: Greg Ungerer @ 2013-04-08 7:40 UTC (permalink / raw)
To: Linus Walleij
Cc: Alex Courbot, Bityutskiy, Artem, Geert Uytterhoeven,
linux-m68k@lists.linux-m68k.org, Grant Likely, Jonas Bonn
Hi Linus,
On 08/04/13 17:20, Linus Walleij wrote:
> On Mon, Apr 8, 2013 at 6:32 AM, Greg Ungerer <gregungerer@westnet.com.au> wrote:
>
>> Or we could fix like this, keeping the existing local functions
>> intact for this one last kernel version.
>>
>> Regards
>> Greg
>>
>>
>> [PATCH] m68k: define a local gpio_request_one() function
>>
>> Compiling for linux-3.9-rc1 and later fails with:
>>
>> drivers/gpio/devres.c: In function 'devm_gpio_request_one':
>> drivers/gpio/devres.c:90:2: error: implicit declaration of function 'gpio_request_one' [-Werror=implicit-function-declaration]
>>
>> So provide a local gpio_request_one() function. Code largely borrowed from
>> blackfin's local gpio_request_one() function.
>>
>> Signed-off-by: Greg Ungerer <gerg@uclinux.org>
>
> Acked-by: Linus Walleij <linus.walleij@linaro.org>
>
> Greg, are you pushing this patch then?
I am happy to push to Linus if everyone is happy with that.
Regards
Greg
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-04-08 7:40 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-05 10:39 m68k build regression Bityutskiy, Artem
2013-04-05 14:49 ` Linus Walleij
2013-04-05 17:20 ` Alex Courbot
2013-04-08 4:32 ` Greg Ungerer
2013-04-08 7:20 ` Linus Walleij
2013-04-08 7:40 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox