* [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build
@ 2025-07-16 9:44 Andy Shevchenko
2025-07-16 10:14 ` Jiri Slaby
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-07-16 9:44 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel, linux-serial
Cc: Jiri Slaby, Andy Shevchenko, Randy Dunlap
On i386, when
CONFIG_X86_INTEL_CE=y
# CONFIG_SERIAL_8250 is not set
will try to compile the driver and use the stub simultaneously.
This breaks the build. Fix it by making sure that the driver
compiles only when CONFIG_SERIAL_8250 is also enabled.
Fixes: acc902de05b2 ("serial: 8250: Move CE4100 quirks to a module under 8250 driver")
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Closes: https://lore.kernel.org/r/cdf4ee46-7bf8-4379-9245-fed9db72e7e8@infradead.org
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/tty/serial/8250/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
index e61dc3f4ca50..1d6633bbcd70 100644
--- a/drivers/tty/serial/8250/Makefile
+++ b/drivers/tty/serial/8250/Makefile
@@ -24,7 +24,9 @@ obj-$(CONFIG_SERIAL_8250_ASPEED_VUART) += 8250_aspeed_vuart.o
obj-$(CONFIG_SERIAL_8250_BCM2835AUX) += 8250_bcm2835aux.o
obj-$(CONFIG_SERIAL_8250_BCM7271) += 8250_bcm7271.o
obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
+ifneq ($(CONFIG_SERIAL_8250),)
obj-$(CONFIG_X86_INTEL_CE) += 8250_ce4100.o
+endif
obj-$(CONFIG_SERIAL_8250_DFL) += 8250_dfl.o
obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o
obj-$(CONFIG_SERIAL_8250_EM) += 8250_em.o
--
2.47.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build
2025-07-16 9:44 [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build Andy Shevchenko
@ 2025-07-16 10:14 ` Jiri Slaby
2025-07-16 10:28 ` Andy Shevchenko
0 siblings, 1 reply; 4+ messages in thread
From: Jiri Slaby @ 2025-07-16 10:14 UTC (permalink / raw)
To: Andy Shevchenko, Greg Kroah-Hartman, linux-kernel, linux-serial
Cc: Randy Dunlap
On 16. 07. 25, 11:44, Andy Shevchenko wrote:
> On i386, when
>
> CONFIG_X86_INTEL_CE=y
> # CONFIG_SERIAL_8250 is not set
>
> will try to compile the driver and use the stub simultaneously.
> This breaks the build. Fix it by making sure that the driver
> compiles only when CONFIG_SERIAL_8250 is also enabled.
>
> Fixes: acc902de05b2 ("serial: 8250: Move CE4100 quirks to a module under 8250 driver")
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Closes: https://lore.kernel.org/r/cdf4ee46-7bf8-4379-9245-fed9db72e7e8@infradead.org
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> drivers/tty/serial/8250/Makefile | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/tty/serial/8250/Makefile b/drivers/tty/serial/8250/Makefile
> index e61dc3f4ca50..1d6633bbcd70 100644
> --- a/drivers/tty/serial/8250/Makefile
> +++ b/drivers/tty/serial/8250/Makefile
> @@ -24,7 +24,9 @@ obj-$(CONFIG_SERIAL_8250_ASPEED_VUART) += 8250_aspeed_vuart.o
> obj-$(CONFIG_SERIAL_8250_BCM2835AUX) += 8250_bcm2835aux.o
> obj-$(CONFIG_SERIAL_8250_BCM7271) += 8250_bcm7271.o
> obj-$(CONFIG_SERIAL_8250_BOCA) += 8250_boca.o
> +ifneq ($(CONFIG_SERIAL_8250),)
Why not ifdef CONFIG_SERIAL_8250 then?
Also, what happens if 8250=m and X86_INTEL_CE=y?
> obj-$(CONFIG_X86_INTEL_CE) += 8250_ce4100.o
> +endif
> obj-$(CONFIG_SERIAL_8250_DFL) += 8250_dfl.o
> obj-$(CONFIG_SERIAL_8250_DW) += 8250_dw.o
> obj-$(CONFIG_SERIAL_8250_EM) += 8250_em.o
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build
2025-07-16 10:14 ` Jiri Slaby
@ 2025-07-16 10:28 ` Andy Shevchenko
2025-07-16 10:43 ` Jiri Slaby
0 siblings, 1 reply; 4+ messages in thread
From: Andy Shevchenko @ 2025-07-16 10:28 UTC (permalink / raw)
To: Jiri Slaby; +Cc: Greg Kroah-Hartman, linux-kernel, linux-serial, Randy Dunlap
On Wed, Jul 16, 2025 at 12:14:23PM +0200, Jiri Slaby wrote:
> On 16. 07. 25, 11:44, Andy Shevchenko wrote:
> > On i386, when
> >
> > CONFIG_X86_INTEL_CE=y
> > # CONFIG_SERIAL_8250 is not set
> >
> > will try to compile the driver and use the stub simultaneously.
> > This breaks the build. Fix it by making sure that the driver
> > compiles only when CONFIG_SERIAL_8250 is also enabled.
...
> > +ifneq ($(CONFIG_SERIAL_8250),)
>
> Why not ifdef CONFIG_SERIAL_8250 then?
$ git grep -n '^ifn\?eq .*CONFIG_' | wc -l
427
$ git grep -n '^ifdef CONFIG_' | wc -l
431
Is there a preference in serial drivers?
> Also, what happens if 8250=m and X86_INTEL_CE=y?
So, in such a case if somebody wants to use UART, it will go crazy due to
missed workaround applied. BUT, this is preexisted issue and not related
(directly) to this fix. Perhaps we can combine both with
ifeq ($(CONFIG_SERIAL_8250),y)
and add two Fixes tags.
> > obj-$(CONFIG_X86_INTEL_CE) += 8250_ce4100.o
> > +endif
--
With Best Regards,
Andy Shevchenko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build
2025-07-16 10:28 ` Andy Shevchenko
@ 2025-07-16 10:43 ` Jiri Slaby
0 siblings, 0 replies; 4+ messages in thread
From: Jiri Slaby @ 2025-07-16 10:43 UTC (permalink / raw)
To: Andy Shevchenko
Cc: Greg Kroah-Hartman, linux-kernel, linux-serial, Randy Dunlap
On 16. 07. 25, 12:28, Andy Shevchenko wrote:
> On Wed, Jul 16, 2025 at 12:14:23PM +0200, Jiri Slaby wrote:
>> On 16. 07. 25, 11:44, Andy Shevchenko wrote:
>>> On i386, when
>>>
>>> CONFIG_X86_INTEL_CE=y
>>> # CONFIG_SERIAL_8250 is not set
>>>
>>> will try to compile the driver and use the stub simultaneously.
>>> This breaks the build. Fix it by making sure that the driver
>>> compiles only when CONFIG_SERIAL_8250 is also enabled.
>
> ...
>
>>> +ifneq ($(CONFIG_SERIAL_8250),)
>>
>> Why not ifdef CONFIG_SERIAL_8250 then?
>
> $ git grep -n '^ifn\?eq .*CONFIG_' | wc -l
> 427
> $ git grep -n '^ifdef CONFIG_' | wc -l
> 431
>
> Is there a preference in serial drivers?
The simpler to read/understand -- the latter.
>> Also, what happens if 8250=m and X86_INTEL_CE=y?
>
> So, in such a case if somebody wants to use UART, it will go crazy due to
> missed workaround applied. BUT, this is preexisted issue and not related
> (directly) to this fix. Perhaps we can combine both with
>
> ifeq ($(CONFIG_SERIAL_8250),y)
>
> and add two Fixes tags.
+1 makes sense to me. Or introduce a Kconfig entry to handle the deps...
thanks,
--
js
suse labs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-07-16 10:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-16 9:44 [PATCH v1 1/1] serial: 8250_ce4100: Fix CONFIG_SERIAL_8250=n build Andy Shevchenko
2025-07-16 10:14 ` Jiri Slaby
2025-07-16 10:28 ` Andy Shevchenko
2025-07-16 10:43 ` Jiri Slaby
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).