Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1244792 > unrolled thread

[PATCH] serial: fix mctrl helper functions

Started byArnd Bergmann <arnd@arndb.de>
First post2015-10-12 17:10 +0200
Last post2015-10-12 17:20 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] serial: fix mctrl helper functions Arnd Bergmann <arnd@arndb.de> - 2015-10-12 17:10 +0200
    Re: [PATCH] serial: fix mctrl helper functions Uwe Kleine-König   <u.kleine-koenig@pengutronix.de> - 2015-10-12 17:20 +0200

#1244792 — [PATCH] serial: fix mctrl helper functions

FromArnd Bergmann <arnd@arndb.de>
Date2015-10-12 17:10 +0200
Subject[PATCH] serial: fix mctrl helper functions
Message-ID<qiMTD-2Aw-1@gated-at.bofh.it>
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)
 {
 }
 

--
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/

[toc] | [next] | [standalone]


#1244805

FromUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Date2015-10-12 17:20 +0200
Message-ID<qiN3k-2LY-35@gated-at.bofh.it>
In reply to#1244792
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/  |
--
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/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web