Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965148AbeALQtp (ORCPT + 1 other); Fri, 12 Jan 2018 11:49:45 -0500 Received: from mail-vk0-f65.google.com ([209.85.213.65]:42722 "EHLO mail-vk0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S964953AbeALQtm (ORCPT ); Fri, 12 Jan 2018 11:49:42 -0500 X-Google-Smtp-Source: ACJfBoufzPFKSgx3WH6l2aTPHmlXciJ0l8I0UjkQvYvIa6Lyw0C5RCuH/lX+cj776P7L5J2oiBtw++m7yhw2Z9pLLzI= MIME-Version: 1.0 In-Reply-To: References: <1515567374-12722-1-git-send-email-yamada.masahiro@socionext.com> From: Ulf Magnusson Date: Fri, 12 Jan 2018 17:49:40 +0100 Message-ID: Subject: Re: [PATCH 1/6] kconfig: do not call check_conf() for olddefconfig To: Masahiro Yamada Cc: Linux Kbuild mailing list , Sam Ravnborg , Michal Marek , Marc Herbert , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Return-Path: On Fri, Jan 12, 2018 at 1:26 PM, Ulf Magnusson wrote: > On Wed, Jan 10, 2018 at 7:56 AM, Masahiro Yamada > wrote: >> 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. >> Rather, olddefconfig belongs to the group of alldefconfig and defconfig. >> >> Signed-off-by: Masahiro Yamada >> --- >> >> 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 866369f..52cbe5d 100644 >> --- a/scripts/kconfig/conf.c >> +++ b/scripts/kconfig/conf.c >> @@ -434,7 +434,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); >> @@ -674,15 +674,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 >> > > Acked-by: Ulf Magnusson > > Cheers, > Ulf Should have been Reviewed-by, obviously. Sorry about that. :) Cheers, Ulf