[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1519776926-30459-2-git-send-email-yamada.masahiro@socionext.com>
Date: Wed, 28 Feb 2018 09:15:21 +0900
From: Masahiro Yamada <yamada.masahiro@...ionext.com>
To: linux-kbuild@...r.kernel.org
Cc: Marc Herbert <marc.herbert@...el.com>,
Ulf Magnusson <ulfalizer@...il.com>,
Sam Ravnborg <sam@...nborg.org>,
Masahiro Yamada <yamada.masahiro@...ionext.com>,
linux-kernel@...r.kernel.org
Subject: [PATCH v2 1/6] kconfig: do not call check_conf() for olddefconfig
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@...ionext.com>
Reviewed-by: Ulf Magnusson <ulfalizer@...il.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
Powered by blists - more mailing lists