linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Masahiro Yamada <masahiroy@kernel.org>
To: linux-kbuild@vger.kernel.org
Cc: Masahiro Yamada <masahiroy@kernel.org>, linux-kernel@vger.kernel.org
Subject: [PATCH 4/5] kconfig: nconf: remove unneeded default for menu prompt
Date: Sun, 11 Apr 2021 04:45:33 +0900	[thread overview]
Message-ID: <20210410194534.187588-4-masahiroy@kernel.org> (raw)
In-Reply-To: <20210410194534.187588-1-masahiroy@kernel.org>

The rootmenu always has a prompt even if the 'mainmenu' statement is
missing in the top Kconfig file.

conf_parse() calls menu_add_prompt(P_MENU, "Main menu", NULL) in this
case.

So, every 'menu' has a prompt.

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

 scripts/kconfig/nconf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/nconf.c b/scripts/kconfig/nconf.c
index daeeb5f81445..b6fe7b18a103 100644
--- a/scripts/kconfig/nconf.c
+++ b/scripts/kconfig/nconf.c
@@ -1068,7 +1068,6 @@ static int do_match(int key, struct match_state *state, int *ans)
 static void conf(struct menu *menu)
 {
 	struct menu *submenu = NULL;
-	const char *prompt = menu_get_prompt(menu);
 	struct symbol *sym;
 	int res;
 	int current_index = 0;
@@ -1086,9 +1085,8 @@ static void conf(struct menu *menu)
 		if (!child_count)
 			break;
 
-		show_menu(prompt ? prompt : "Main Menu",
-				menu_instructions,
-				current_index, &last_top_row);
+		show_menu(menu_get_prompt(menu), menu_instructions,
+			  current_index, &last_top_row);
 		keypad((menu_win(curses_menu)), TRUE);
 		while (!global_exit) {
 			if (match_state.in_search) {
-- 
2.27.0


  parent reply	other threads:[~2021-04-10 19:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-10 19:45 [PATCH 1/5] kconfig: mconf,nconf: remove unneeded '\0' termination after snprintf() Masahiro Yamada
2021-04-10 19:45 ` [PATCH 2/5] kconfig: nconf: fix NORMAL attributes Masahiro Yamada
2021-04-10 19:45 ` [PATCH 3/5] kconfig: nconf: get rid of (void) casts from wattrset() calls Masahiro Yamada
2021-04-10 19:45 ` Masahiro Yamada [this message]
2021-04-10 19:45 ` [PATCH 5/5] kconfig: nconf: refactor attributes setup code Masahiro Yamada

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=20210410194534.187588-4-masahiroy@kernel.org \
    --to=masahiroy@kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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).