Skip to contentSkip to conversation

m68k: make HPDCA and HPAPCI bools

PATCH In review Jiri Slaby (SUSE) 2 participants 3 messages Aug 22, 2025 – Sep 8, 2025

Subsystems (2)
lore
Share & tools
lore

Jiri Slaby (SUSE)

author maintainer
#0 lore raw

PATCH 1/1 m68k: make HPDCA and HPAPCI bools

The only user -- 8250_hp300 -- tests for CONFIG_HPDCA and CONFIG_HPAPCI. It does not test for *_MODULE variants. That means that if someone sets the configs to =m, the code is not compiled at all.

There is actually no point having these as tristate. Switch them to bool.

---
 arch/m68k/Kconfig.devices | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.devices +2 -2
index e6e3efac1840..e277f1bd2de1 100644
@@ -105,14 +105,14 @@ config AMIGA_BUILTIN_SERIAL
 	  To compile this driver as a module, choose M here.
 
 config HPDCA
-	tristate "HP DCA serial support"
+	bool "HP DCA serial support"
 	depends on DIO && SERIAL_8250
 	help
 	  If you want to use the internal "DCA" serial ports on an HP300
 	  machine, say Y here.
 
 config HPAPCI
-	tristate "HP APCI serial support"
+	bool "HP APCI serial support"
 	depends on HP300 && SERIAL_8250
 	help
 	  If you want to use the internal "APCI" serial ports on an HP400
Signature · 1 line
2.51.0
#1 lore raw

CC PhilB

Quoted 37 lines · Jiri Slaby (SUSE)

The only user -- 8250_hp300 -- tests for CONFIG_HPDCA and CONFIG_HPAPCI. It does not test for *_MODULE variants. That means that if someone sets the configs to =m, the code is not compiled at all.

There is actually no point having these as tristate. Switch them to bool.

---
 arch/m68k/Kconfig.devices | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/m68k/Kconfig.devices +2 -3
index e6e3efac1840..e277f1bd2de1 100644
@@ -105,14 +105,14 @@ config AMIGA_BUILTIN_SERIAL
          To compile this driver as a module, choose M here.
 
 config HPDCA
-       tristate "HP DCA serial support"
+       bool "HP DCA serial support"
        depends on DIO && SERIAL_8250
        help
          If you want to use the internal "DCA" serial ports on an HP300
          machine, say Y here.
 
 config HPAPCI
-       tristate "HP APCI serial support"
+       bool "HP APCI serial support"
        depends on HP300 && SERIAL_8250
        help
          If you want to use the internal "APCI" serial ports on an HP400
--

2.51.0

#2 lore raw
In reply to Jiri Slaby (SUSE)

Hi Jiri,

Quoted 8 lines · Jiri Slaby (SUSE)

The only user -- 8250_hp300 -- tests for CONFIG_HPDCA and CONFIG_HPAPCI. It does not test for *_MODULE variants. That means that if someone sets the configs to =m, the code is not compiled at all.

There is actually no point having these as tristate. Switch them to bool.

Thanks for your patch!

Quoted 9 lines
arch/m68k/Kconfig.devices +1 -1
@@ -105,14 +105,14 @@ config AMIGA_BUILTIN_SERIAL
          To compile this driver as a module, choose M here.
 
 config HPDCA
-       tristate "HP DCA serial support"
+       bool "HP DCA serial support"
        depends on DIO && SERIAL_8250

arch/m68k/Kconfig.devices config AMIGA_BUILTIN_SERIAL · line 118

Quoted 10 lines
arch/m68k/Kconfig.devices +1 -1
        help
          If you want to use the internal "DCA" serial ports on an HP300
          machine, say Y here.
 
 config HPAPCI
-       tristate "HP APCI serial support"
+       bool "HP APCI serial support"
        depends on HP300 && SERIAL_8250
        help
          If you want to use the internal "APCI" serial ports on an HP400

This still causes a warning if SERIAL_8250 and HP300 are enabled, but none of HPDCA and HPAPCI are enabled:

    drivers/tty/serial/8250/8250_hp300.c:24:2: warning: #warning

CONFIG_SERIAL_8250 defined but neither CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure? [-Wcpp]
24 | #warning CONFIG_SERIAL_8250 defined but neither
CONFIG_HPDCA nor CONFIG_HPAPCI defined, are you sure?

          |  ^~~~~~~

I have sent and alternativ\e fix.

[1] "[PATCH 0/2] tty: serial: 8250: Rework HP300 serial Kconfig logic"

    https://lore.kernel.org/[email protected]

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds