mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: linux-kbuild@vger.kernel.org
Cc: Marc Herbert <marc.herbert@intel.com>,
	Ulf Magnusson <ulfalizer@gmail.com>,
	Sam Ravnborg <sam@ravnborg.org>,
	Masahiro Yamada <yamada.masahiro@socionext.com>,
	linux-kernel@vger.kernel.org
Subject: [PATCH v2 1/6] kconfig: do not call check_conf() for olddefconfig
Date: Wed, 28 Feb 2018 09:15:21 +0900	[thread overview]
Message-ID: <1519776926-30459-2-git-send-email-yamada.masahiro@socionext.com> (raw)
In-Reply-To: <1519776926-30459-1-git-send-email-yamada.masahiro@socionext.com>

check_conf() traverses the menu tree, but it is completely no-op for
olddefconfig because the following if-else block does nothing.

    if (input_mode == listnewconfig) {
            ...
    } else if (input_mode != olddefconfig) {
            ...
    }

As the help message says, olddefconfig automatically sets new symbols
to their default value.  There is no room for manual intervention.
So, calling check_conf() for olddefconfig is odd in the first place.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Ulf Magnusson <ulfalizer@gmail.com>
---

Changes in v2: None

 scripts/kconfig/conf.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 822dc51..4227d3b 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -424,7 +424,7 @@ static void check_conf(struct menu *menu)
 				if (sym->name && !sym_is_choice_value(sym)) {
 					printf("%s%s\n", CONFIG_, sym->name);
 				}
-			} else if (input_mode != olddefconfig) {
+			} else {
 				if (!conf_cnt++)
 					printf(_("*\n* Restart config...\n*\n"));
 				rootEntry = menu_get_parent_menu(menu);
@@ -666,15 +666,15 @@ int main(int ac, char **av)
 		/* fall through */
 	case oldconfig:
 	case listnewconfig:
-	case olddefconfig:
 	case silentoldconfig:
 		/* Update until a loop caused no more changes */
 		do {
 			conf_cnt = 0;
 			check_conf(&rootmenu);
-		} while (conf_cnt &&
-			 (input_mode != listnewconfig &&
-			  input_mode != olddefconfig));
+		} while (conf_cnt && input_mode != listnewconfig);
+		break;
+	case olddefconfig:
+	default:
 		break;
 	}
 
-- 
2.7.4

  reply	other threads:[~2018-02-28  0:16 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-28  0:15 [PATCH v2 0/6] kconfig: some clean-ups and rename silentoldconfig Masahiro Yamada
2018-02-28  0:15 ` Masahiro Yamada [this message]
2018-02-28  0:15 ` [PATCH v2 2/6] kconfig: remove unneeded input_mode test in conf() Masahiro Yamada
2018-02-28  0:15 ` [PATCH v2 3/6] kconfig: remove redundant input_mode test for check_conf() loop Masahiro Yamada
2018-02-28  0:15 ` [PATCH v2 4/6] kconfig: hide irrelevant sub-menus for oldconfig Masahiro Yamada
2018-02-28  0:15 ` [PATCH v2 5/6] kconfig: invoke oldconfig instead of silentoldconfig from local*config Masahiro Yamada
2018-02-28  5:15   ` Ulf Magnusson
2018-03-01  7:44     ` Masahiro Yamada
2018-03-01 11:18       ` [PATCH] kconfig: remove redundant streamline_config.pl prerequisite Ulf Magnusson
2018-03-01 14:39         ` Masahiro Yamada
2018-03-01 14:44           ` Masahiro Yamada
2018-03-01 14:50             ` Masahiro Yamada
2018-03-01 15:23           ` Ulf Magnusson
2018-03-06  9:48             ` Masahiro Yamada
2018-02-28  0:15 ` [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig Masahiro Yamada
2018-02-28  2:10   ` Randy Dunlap
2018-02-28  5:41   ` Ulf Magnusson
2018-02-28  5:43     ` Ulf Magnusson
2018-02-28 15:27 ` [PATCH v2 0/6] kconfig: some clean-ups and rename silentoldconfig 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=1519776926-30459-2-git-send-email-yamada.masahiro@socionext.com \
    --to=yamada.masahiro@socionext.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marc.herbert@intel.com \
    --cc=sam@ravnborg.org \
    --cc=ulfalizer@gmail.com \
    /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®