linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: linux-kernel@vger.kernel.org,
	Matt Porter <mporter@kernel.crashing.org>,
	Alexandre Bounine <alex.bou9@gmail.com>,
	Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 1/2] rapidio: specify the type for tristate choice explicitly
Date: Sat, 27 Apr 2024 19:42:30 +0900	[thread overview]
Message-ID: <20240427104231.2728905-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20240427104231.2728905-1-masahiroy@kernel.org>

If the type of choice is not specified, it is implied by the first
entry within the choice block.

In this case, the first (and only) entry, RAPIDIO_ENUM_BASIC, is
tristate, hence this choice behaves as tristate.

Kconfig will stop this implication because it has a bug, and 99% of
choice use cases are bool. In fact, this is the only instance of
tristate choice in the kernel.

Before transitioning the default choice type to 'bool', specify the
type explicitly for this case.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 drivers/rapidio/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/rapidio/Kconfig b/drivers/rapidio/Kconfig
index b9f8514909bf..72b5b02492a1 100644
--- a/drivers/rapidio/Kconfig
+++ b/drivers/rapidio/Kconfig
@@ -60,7 +60,7 @@ config RAPIDIO_DEBUG
 	  If you are unsure about this, say N here.
 
 choice
-	prompt "Enumeration method"
+	tristate "Enumeration method"
 	depends on RAPIDIO
 	default RAPIDIO_ENUM_BASIC
 	help
-- 
2.40.1


  reply	other threads:[~2024-04-27 10:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-27 10:42 [PATCH 0/2] kconfig: stop implification of choice type Masahiro Yamada
2024-04-27 10:42 ` Masahiro Yamada [this message]
2024-05-07  8:30   ` [PATCH 1/2] rapidio: specify the type for tristate choice explicitly Nicolas Schier
2024-04-27 10:42 ` [PATCH 2/2] kconfig: do not imply the type of choice from the first entry Masahiro Yamada
2024-05-07  8:45   ` Nicolas Schier

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=20240427104231.2728905-2-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=alex.bou9@gmail.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mporter@kernel.crashing.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;
as well as URLs for NNTP newsgroup(s).