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


Groups > linux.kernel > #1332166 > unrolled thread

[PATCH v2 4/6] serial: 8250/uniphier: fix modular build

Started byArnd Bergmann <arnd@arndb.de>
First post2016-02-11 16:50 +0100
Last post2016-02-12 17:40 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v2 4/6] serial: 8250/uniphier: fix modular build Arnd Bergmann <arnd@arndb.de> - 2016-02-11 16:50 +0100
    Re: [PATCH v2 4/6] serial: 8250/uniphier: fix modular build Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-02-12 10:40 +0100
      Re: [PATCH v2 4/6] serial: 8250/uniphier: fix modular build Arnd Bergmann <arnd@arndb.de> - 2016-02-12 11:10 +0100
        Re: [PATCH v2 4/6] serial: 8250/uniphier: fix modular build Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-02-12 11:40 +0100
        Re: [PATCH v2 4/6] serial: 8250/uniphier: fix modular build Masahiro Yamada <yamada.masahiro@socionext.com> - 2016-02-12 17:40 +0100

#1332166 — [PATCH v2 4/6] serial: 8250/uniphier: fix modular build

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-11 16:50 +0100
Subject[PATCH v2 4/6] serial: 8250/uniphier: fix modular build
Message-ID<r11Ff-2lT-7@gated-at.bofh.it>
The newly added uniphier serial port driver fails to build as
a loadable module when the base 8250 driver is built-in and
its console support enabled:

ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined!

This changes the driver to only provide the early console support
if it is built-in itself as well.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/tty/serial/8250/8250_uniphier.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
index bab6b3ae2540..1b7bd26555b7 100644
--- a/drivers/tty/serial/8250/8250_uniphier.c
+++ b/drivers/tty/serial/8250/8250_uniphier.c
@@ -35,7 +35,7 @@ struct uniphier8250_priv {
 	spinlock_t atomic_write_lock;
 };
 
-#ifdef CONFIG_SERIAL_8250_CONSOLE
+#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE)
 static int __init uniphier_early_console_setup(struct earlycon_device *device,
 					       const char *options)
 {
-- 
2.7.0

[toc] | [next] | [standalone]


#1332619

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-02-12 10:40 +0100
Message-ID<r1imK-54w-21@gated-at.bofh.it>
In reply to#1332166
Hi Arnd,




2016-02-12 0:41 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> The newly added uniphier serial port driver fails to build as
> a loadable module when the base 8250 driver is built-in and
> its console support enabled:
>
> ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined!
>
> This changes the driver to only provide the early console support
> if it is built-in itself as well.
>
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>  drivers/tty/serial/8250/8250_uniphier.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/tty/serial/8250/8250_uniphier.c b/drivers/tty/serial/8250/8250_uniphier.c
> index bab6b3ae2540..1b7bd26555b7 100644
> --- a/drivers/tty/serial/8250/8250_uniphier.c
> +++ b/drivers/tty/serial/8250/8250_uniphier.c
> @@ -35,7 +35,7 @@ struct uniphier8250_priv {
>         spinlock_t atomic_write_lock;
>  };
>
> -#ifdef CONFIG_SERIAL_8250_CONSOLE
> +#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE)
>  static int __init uniphier_early_console_setup(struct earlycon_device *device,
>                                                const char *options)
>  {
> --
> 2.7.0
>

I noticed commit 2eaa790989e03900298ad24f77f1086dbbc1aebd
revived this link error, but I am not happy with seeing
this patch again and again.


Can you check this patch?
https://patchwork.kernel.org/patch/8289231/



-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [next] | [standalone]


#1332654

FromArnd Bergmann <arnd@arndb.de>
Date2016-02-12 11:10 +0100
Message-ID<r1iPM-5vL-11@gated-at.bofh.it>
In reply to#1332619
On Friday 12 February 2016 18:37:08 Masahiro Yamada wrote:
> >  };
> >
> > -#ifdef CONFIG_SERIAL_8250_CONSOLE
> > +#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE)
> >  static int __init uniphier_early_console_setup(struct earlycon_device *device,
> >                                                const char *options)
> >  {
> > --
> > 2.7.0
> >
> 
> I noticed commit 2eaa790989e03900298ad24f77f1086dbbc1aebd
> revived this link error, but I am not happy with seeing
> this patch again and again.
> 
> 
> Can you check this patch?
> https://patchwork.kernel.org/patch/8289231/
> 
> 
> 

Yes, I think your patch is nicer than mine. Let's see what the others
think, then I can resend my remaining patches on top of yours.

	Arnd

[toc] | [prev] | [next] | [standalone]


#1332663

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-02-12 11:40 +0100
Message-ID<r1jiO-5IA-1@gated-at.bofh.it>
In reply to#1332654
Hi Arnd,


2016-02-12 19:07 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Friday 12 February 2016 18:37:08 Masahiro Yamada wrote:
>> >  };
>> >
>> > -#ifdef CONFIG_SERIAL_8250_CONSOLE
>> > +#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE)
>> >  static int __init uniphier_early_console_setup(struct earlycon_device *device,
>> >                                                const char *options)
>> >  {
>> > --
>> > 2.7.0
>> >
>>
>> I noticed commit 2eaa790989e03900298ad24f77f1086dbbc1aebd
>> revived this link error, but I am not happy with seeing
>> this patch again and again.
>>
>>
>> Can you check this patch?
>> https://patchwork.kernel.org/patch/8289231/
>>
>>
>>
>
> Yes, I think your patch is nicer than mine. Let's see what the others
> think, then I can resend my remaining patches on top of yours.

OK, thanks!

I noticed some typos, so I've posted v2.
(no change in code-diff).



-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [next] | [standalone]


#1332884

FromMasahiro Yamada <yamada.masahiro@socionext.com>
Date2016-02-12 17:40 +0100
Message-ID<r1oVc-ZL-19@gated-at.bofh.it>
In reply to#1332654
Hi Arnd,


2016-02-12 19:07 GMT+09:00 Arnd Bergmann <arnd@arndb.de>:
> On Friday 12 February 2016 18:37:08 Masahiro Yamada wrote:
>> >  };
>> >
>> > -#ifdef CONFIG_SERIAL_8250_CONSOLE
>> > +#if defined(CONFIG_SERIAL_8250_CONSOLE) && !defined(MODULE)
>> >  static int __init uniphier_early_console_setup(struct earlycon_device *device,
>> >                                                const char *options)
>> >  {
>> > --
>> > 2.7.0
>> >
>>
>> I noticed commit 2eaa790989e03900298ad24f77f1086dbbc1aebd
>> revived this link error, but I am not happy with seeing
>> this patch again and again.
>>
>>
>> Can you check this patch?
>> https://patchwork.kernel.org/patch/8289231/
>>
>>
>>
>
> Yes, I think your patch is nicer than mine. Let's see what the others
> think, then I can resend my remaining patches on top of yours.
>

As Peter pointed out, my patch would not work without CONFIG_OF.

I can not suggest any other alternative,
so I am OK with this patch.

Unfortunately, the "tty-linus" branch is getting dirty with
apply, revert, apply again.



-- 
Best Regards
Masahiro Yamada

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web