linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: fix mctrl helper functions
@ 2015-10-12 15:04 Arnd Bergmann
  2015-10-12 15:15 ` Uwe Kleine-König
  0 siblings, 1 reply; 2+ messages in thread
From: Arnd Bergmann @ 2015-10-12 15:04 UTC (permalink / raw)
  To: linux-serial, gregkh
  Cc: Jiri Slaby, linux-kernel, Nicolas Ferre, u.kleine-koenig

A recent patch to create common helper functions for modem control
lines created empty helper functions in a header file, but accidentally
did not mark them as 'static inline', which causes build errors:

drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_enable_ms':
mxs-auart.c:(.text+0x171c): multiple definition of `mctrl_gpio_enable_ms'
drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x768): first defined here
drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_disable_ms':
mxs-auart.c:(.text+0x1720): multiple definition of `mctrl_gpio_disable_ms'
drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x76c): first defined here

This adds the missing annotation, so the functions do not get placed
in each object file.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling")

diff --git a/drivers/tty/serial/serial_mctrl_gpio.h b/drivers/tty/serial/serial_mctrl_gpio.h
index 3c4ac9ae41f9..9716db283290 100644
--- a/drivers/tty/serial/serial_mctrl_gpio.h
+++ b/drivers/tty/serial/serial_mctrl_gpio.h
@@ -133,11 +133,11 @@ void mctrl_gpio_free(struct device *dev, struct mctrl_gpios *gpios)
 {
 }
 
-void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_enable_ms(struct mctrl_gpios *gpios)
 {
 }
 
-void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
+static inline void mctrl_gpio_disable_ms(struct mctrl_gpios *gpios)
 {
 }
 

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

* Re: [PATCH] serial: fix mctrl helper functions
  2015-10-12 15:04 [PATCH] serial: fix mctrl helper functions Arnd Bergmann
@ 2015-10-12 15:15 ` Uwe Kleine-König
  0 siblings, 0 replies; 2+ messages in thread
From: Uwe Kleine-König @ 2015-10-12 15:15 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: linux-serial, gregkh, Jiri Slaby, linux-kernel, Nicolas Ferre

Hello Arnd,

On Mon, Oct 12, 2015 at 05:04:14PM +0200, Arnd Bergmann wrote:
> A recent patch to create common helper functions for modem control
> lines created empty helper functions in a header file, but accidentally
> did not mark them as 'static inline', which causes build errors:
> 
> drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_enable_ms':
> mxs-auart.c:(.text+0x171c): multiple definition of `mctrl_gpio_enable_ms'
> drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x768): first defined here
> drivers/tty/serial/mxs-auart.o: In function `mctrl_gpio_disable_ms':
> mxs-auart.c:(.text+0x1720): multiple definition of `mctrl_gpio_disable_ms'
> drivers/tty/serial/clps711x.o:clps711x.c:(.text+0x76c): first defined here
> 
> This adds the missing annotation, so the functions do not get placed
> in each object file.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> Fixes: ce59e48fdbad ("serial: mctrl_gpio: implement interrupt handling")
Sounds and looks right. Thanks.

Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

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

end of thread, other threads:[~2015-10-12 15:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-12 15:04 [PATCH] serial: fix mctrl helper functions Arnd Bergmann
2015-10-12 15:15 ` Uwe Kleine-König

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).