From: Masahiro Yamada <masahiroy@kernel.org>
To: Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
linux-mips@vger.kernel.org
Cc: linux-kbuild@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 0/1] MIPS: fix the "CPU type" choice structure
Date: Sun, 28 Jan 2024 01:23:08 +0900 [thread overview]
Message-ID: <20240127162309.1026549-1-masahiroy@kernel.org> (raw)
The bool type "choice" is meant to list exclusively selected config
options.
Unless you are familiar with the Kconfig internals, you will not
understand how CONFIG_B can be enabled in the following code:
choice
prompt "Choose one of them, but how to choose B?"
config A
bool "A"
config B
bool "B"
depends on A
config C
bool "C"
endchoice
B is not a choice value because it becomes a child of A, as a side-effect
of re-paranting in menu_finalize().
It is unreadable, and I even consider it as a bug.
My plan is to forbid such a silly choice structure.
Just write as follows:
choice
prompt "Choose one of them"
config A
bool "A"
config C
bool "C"
endchoice
config B
bool "B"
depends on A
Fortunately, arch/mips/Kconfig seems to be the only file I need to fix.
Masahiro Yamada (1):
MIPS: move unselectable entries out of the "CPU type" choice
arch/mips/Kconfig | 76 +++++++++++++++++++++++------------------------
1 file changed, 38 insertions(+), 38 deletions(-)
--
2.40.1
next reply other threads:[~2024-01-27 16:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-27 16:23 Masahiro Yamada [this message]
2024-01-27 16:23 ` [PATCH 1/1] MIPS: move unselectable entries out of the "CPU type" choice Masahiro Yamada
2024-01-27 19:50 ` Jiaxun Yang
2024-02-20 13:38 ` Thomas Bogendoerfer
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=20240127162309.1026549-1-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).