From: =?UTF-8?B?SmFudXN6IFXFvHlja2k=?= Subject: Re: [RFC PATCH v2 1/4] tty: serial_mctrl_gpio: Add irqs helpers for input lines Date: Tue, 13 Jan 2015 15:44:09 +0100 Message-ID: <54B52F39.1030709@elproma.com.pl> References: <1420900366-9169-1-git-send-email-j.uzycki@elproma.com.pl> <54B52304.1030008@elproma.com.pl> <54B52CCB.3030100@elproma.com.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from v032797.home.net.pl ([89.161.177.31]:60489 "HELO v032797.home.net.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1751414AbbAMOoG (ORCPT ); Tue, 13 Jan 2015 09:44:06 -0500 In-Reply-To: Sender: linux-gpio-owner@vger.kernel.org List-Id: linux-gpio@vger.kernel.org To: Richard Genoud Cc: Greg Kroah-Hartman , Linus Walleij , =?UTF-8?B?VXdlIEtsZWluZS1Lw7ZuaWc=?= , Alexander Shiyan , fabio.estevam@freescale.com, Fabio Estevam , "linux-serial@vger.kernel.org" , "linux-gpio@vger.kernel.org" , Alexandre Courbot , "linux-arm-kernel@lists.infradead.org" W dniu 2015-01-13 o 15:41, Richard Genoud pisze: > 2015-01-13 15:33 GMT+01:00 Janusz U=C5=BCycki : >> W dniu 2015-01-13 o 15:30, Richard Genoud pisze: >> >>> 2015-01-13 14:52 GMT+01:00 Janusz U=C5=BCycki : >>>> W dniu 2015-01-13 o 14:04, Richard Genoud pisze: >>>> >>>>> 2015-01-10 15:32 GMT+01:00 Janusz Uzycki : >>>>>> diff --git a/drivers/tty/serial/serial_mctrl_gpio.h >>>>>> b/drivers/tty/serial/serial_mctrl_gpio.h >>>>>> index 400ba04..13ba3f4 100644 >>>>>> --- a/drivers/tty/serial/serial_mctrl_gpio.h >>>>>> +++ b/drivers/tty/serial/serial_mctrl_gpio.h >>>>>> @@ -21,6 +21,7 @@ >>>>>> #include >>>>>> #include >>>>>> #include >>>>>> +#include >>>>>> >>>>>> enum mctrl_gpio_idx { >>>>>> UART_GPIO_CTS, >>>>>> @@ -40,6 +41,13 @@ enum mctrl_gpio_idx { >>>>>> */ >>>>>> struct mctrl_gpios; >>>>>> >>>>>> +/* >>>>>> + * Return true if gidx is GPIO line, otherwise false. >>>>>> + * It assumes that gpios is allocated and not NULL. >>>>>> + */ >>>>>> +inline >>>>>> +bool mctrl_gpio_is_gpio(struct mctrl_gpios *gpios, enum mctrl_g= pio_idx >>>>>> gidx); >>>>>> + >>>>> This leads to a compile error : >>>>> CC drivers/tty/serial/atmel_serial.o >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/atmel_serial.c: In function >>>>> 'atmel_disable_ms.part.22': >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:536:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:539:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:542:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:545:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/atmel_serial.c: In function 'atmel_enable_ms': >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:503:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:506:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:509:25: error: called from here >>>>> In file included from drivers/tty/serial/atmel_serial.c:64:0: >>>>> drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining fail= ed in >>>>> call to always_inline 'mctrl_gpio_is_gpio': function body not >>>>> available >>>>> drivers/tty/serial/atmel_serial.c:512:25: error: called from here >>>>> make[3]: *** [drivers/tty/serial/atmel_serial.o] Error 1 >>>>> make[2]: *** [drivers/tty/serial] Error 2 >>>>> make[1]: *** [drivers/tty] Error 2 >>>>> make: *** [drivers] Error 2 >>>> >>>> Do you compile atmel_serial as module? I compiled built-in and it = was >>>> fine >>>> for me. >>>> So the function should be exported like mctrl_gpio_to_gpiod() I gu= ess. >>>> An other reason can be you have CONFIG_GPIOLIB=3Dn ? >>>> In fact, mctrl_gpio_is_gpio() should depend on CONFIG_GPIOLIB for = empty >>>> body. >>>> >>> well, I'm also compiling it built-in (I even have config_module=3DN= ) >> >> You have no CONFIG_GPIOLIB enabled and it is the bug in the patchset= =2E >> Thanks. >> Janusz > Actually, I have CONFIG_GPIOLIB=3Dy, only it doesn't appears in the d= efconfig. > I did: > # cp defconfig arch/arm/configs/toto_defconfig > # ARCH=3Darm make toto_defconfig > > # grep CONFIG_GPIOLIB .config > CONFIG_GPIOLIB=3Dy > CONFIG_GPIOLIB_IRQCHIP=3Dy > > # LANG=3DC ARCH=3Darm > CROSS_COMPILE=3D~/dev/LNS/buildroot-VIP/output/host/usr/bin/arm-linux= - > make -j12 uImage > [...] > drivers/tty/serial/serial_mctrl_gpio.h:49:6: error: inlining failed i= n > call to always_inline 'mctrl_gpio_is_gpio': function body not > available > drivers/tty/serial/atmel_serial.c:536:25: error: called from here > In file included from drivers/tty/serial/atmel_serial.c:64:0: OK, I will fix the bug. It's interesting I compiled it using gcc versio= n=20 4.2.4. thanks, Janusz -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" i= n the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html