mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>,
	Philip Blundell <philb@gnu.org>,
	Kars de Jong <jongk@linux-m68k.org>
Cc: linux-m68k@lists.linux-m68k.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 2/2] tty: serial: 8250: Rework HP300 serial Kconfig logic
Date: Mon,  8 Sep 2025 11:45:42 +0200	[thread overview]
Message-ID: <f69570963ce01fe83bf11675c47415530e8d950e.1757323858.git.geert@linux-m68k.org> (raw)
In-Reply-To: <cover.1757323858.git.geert@linux-m68k.org>

When SERIAL_8250 and HP300 are enabled, but none of SERIAL_8250_HPDCA
and SERIAL_8250_HPAPCI is built-in:

    drivers/tty/serial/8250/8250_hp300.c:24:2: warning: #warning CONFIG_SERIAL_8250 defined but neither CONFIG_SERIAL_8250_HPDCA nor CONFIG_SERIAL_8250_HPAPCI defined, are you sure? [-Wcpp]
       24 | #warning CONFIG_SERIAL_8250 defined but neither CONFIG_SERIAL_8250_HPDCA nor CONFIG_SERIAL_8250_HPAPCI defined, are you sure?
	  |  ^~~~~~~

Fix this by reworking the Kconfig logic to make such combinations
impossible:
  - Stop enabling SERIAL_8250_HP300 by default when both SERIAL_8250 and
    HP300 are enabled,
  - Instead, let SERIAL_8250_HPDCA and SERIAL_8250_HPAPCI select
    SERIAL_8250_HP300.

Note that since commit 0cff260a42c051ee ("[SERIAL] Allow 8250 PCI, PNP,
GSC and HP300 support to be disabled"), the warning message is wrong,
and should have been s/CONFIG_SERIAL_8250/CONFIG_SERIAL_8250_HP300/.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 drivers/tty/serial/8250/8250_hp300.c | 4 ----
 drivers/tty/serial/8250/Kconfig      | 4 ++--
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/tty/serial/8250/8250_hp300.c b/drivers/tty/serial/8250/8250_hp300.c
index 583a86d87b559ec4..30e7d09eed8ae5bf 100644
--- a/drivers/tty/serial/8250/8250_hp300.c
+++ b/drivers/tty/serial/8250/8250_hp300.c
@@ -20,10 +20,6 @@
 
 #include "8250.h"
 
-#if !defined(CONFIG_SERIAL_8250_HPDCA) && !defined(CONFIG_SERIAL_8250_HPAPCI) && !defined(CONFIG_COMPILE_TEST)
-#warning CONFIG_SERIAL_8250 defined but neither CONFIG_SERIAL_8250_HPDCA nor CONFIG_SERIAL_8250_HPAPCI defined, are you sure?
-#endif
-
 #ifdef CONFIG_SERIAL_8250_HPAPCI
 struct hp300_port {
 	struct hp300_port *next;	/* next port */
diff --git a/drivers/tty/serial/8250/Kconfig b/drivers/tty/serial/8250/Kconfig
index 2696c236917afddd..9b5df423606bfb80 100644
--- a/drivers/tty/serial/8250/Kconfig
+++ b/drivers/tty/serial/8250/Kconfig
@@ -159,12 +159,11 @@ config SERIAL_8250_EXAR
 
 config SERIAL_8250_HP300
 	tristate
-	depends on SERIAL_8250 && HP300
-	default SERIAL_8250
 
 config SERIAL_8250_HPDCA
 	tristate "8250 HP DCA serial support"
 	depends on SERIAL_8250 && DIO
+	select SERIAL_8250_HP300
 	help
 	  If you want to use the internal "DCA" serial ports on an HP300
 	  machine, say Y here.
@@ -172,6 +171,7 @@ config SERIAL_8250_HPDCA
 config SERIAL_8250_HPAPCI
 	tristate "8250 HP APCI serial support"
 	depends on SERIAL_8250 && HP300
+	select SERIAL_8250_HP300
 	help
 	  If you want to use the internal "APCI" serial ports on an HP400
 	  machine, say Y here.
-- 
2.43.0


  parent reply	other threads:[~2025-09-08  9:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-08  9:45 [PATCH 0/2] " Geert Uytterhoeven
2025-09-08  9:45 ` [PATCH 1/2] tty: serial: 8250: Move HP300/400 serial Kconfig options Geert Uytterhoeven
2025-09-08  9:45 ` Geert Uytterhoeven [this message]
2025-09-08 10:07 ` [PATCH 0/2] tty: serial: 8250: Rework HP300 serial Kconfig logic Geert Uytterhoeven

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f69570963ce01fe83bf11675c47415530e8d950e.1757323858.git.geert@linux-m68k.org \
    --to=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=jongk@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-m68k@lists.linux-m68k.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=philb@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®