Received: by 10.223.185.116 with SMTP id b49csp5576891wrg; Tue, 27 Feb 2018 16:19:10 -0800 (PST) X-Google-Smtp-Source: AH8x227zH0ZAHTizoe497kDUCsbc+6trKXxr13r/eYDyFKq11YDeh6e+hRi61fa6E4kMj9nhYCgN X-Received: by 10.98.229.21 with SMTP id n21mr15634045pff.158.1519777150480; Tue, 27 Feb 2018 16:19:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777150; cv=none; d=google.com; s=arc-20160816; b=xhZ7dO6inxmmILOQxz9MKp72RTQoxxF/vYBMgii3WD9WY3JhLfgaHd++0WcGmHuGjz gQqC6PJcjpvqMIxFYUoh9Gkzt/5ewuzQxDrUnS2YkTVPSRUiydUi1eDe/trarzcr5l6x dY/MCSyKo8AidGSa54rrGotfiZMt3mEXS+IJHKMlwaFqYOtYepMUZj4tMRUh2RjjQRZN QL6ZGKdrkmvmz8MXYC4iT175yZvwJGd0qmo5bs6c0hKSpkK0djMnAf0HuuObaHnGT4w0 ktPo96RPF+BFCff30i64IhWl32hvCV9hrlJffv0o986rMIvZZDtMrYRjS2SwnLgMN5vs mnhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=96ZAoom6IstfJyABGuZitxlaeADaxw097xN6n2I5kfs=; b=ls+HzRGN9ch3wR3tLMIQtFib3Vv0JhJ1pDHbRgDX6XDMKTD1fvkT1AhkjDNjW4xChg zsdzJxhpt6wTodTR6hnyd+P+yhCm2ivk6BlOYg8Z6nQGtijAXSNezpvWyOHDURM6vbDC fiJ3CUtKiIhNwRnbokD9b3rzEcpD2BLRg885xaXA6Ij6WDJaOGnkJUSki3/v3TVwOzHo tJF2p3LYVV5uWpsXhooSjJSIzZQ9GKM86SKFvr5hxWJQTG8Qg5LXzfykJM30vcuTUb43 rmWZJD0xIQAuthT5AaB+gy+0T7hCgs0TWK6BkRxpd1Y80sYSRMn414ilCUCZgnGoDFiQ pz3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ewg3JCXs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o6-v6si278425plh.287.2018.02.27.16.18.55; Tue, 27 Feb 2018 16:19:10 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=ewg3JCXs; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751965AbeB1AQv (ORCPT + 99 others); Tue, 27 Feb 2018 19:16:51 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24307 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751654AbeB1AQr (ORCPT ); Tue, 27 Feb 2018 19:16:47 -0500 Received: from grover.sesame (FL1-125-199-20-195.osk.mesh.ad.jp [125.199.20.195]) (authenticated) by conuserg-09.nifty.com with ESMTP id w1S0Fahl000353; Wed, 28 Feb 2018 09:15:37 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Fahl000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776937; bh=96ZAoom6IstfJyABGuZitxlaeADaxw097xN6n2I5kfs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ewg3JCXsI5xLRZ/Q8sf4B2dxuGpMVZ5kt4c/ZdrRdaNILqSp0lQeu9UbpZlGYg4bj sXT0vCSQ7r3VGA6O3oOKq0+TXQElX3JRi1KQSXmlZTJ9wMQH5T26CHyBS659HMhinZ EhQKdjDbyKy9/NWnge1lp3aDWBcQeDeyQfCcrx0X72tMAI1tirDB8wKWNIA9gMkfQy oxVWaNNp0RSiWvYGxuwvzfBXEtVHawfQbFOlT2Dd9hufWSidoZmeklNuzTZ4NlWMN5 STfDUo9mJDvA/71YJzZxejUpWzZeAMj7p8pyn8kAiopG338Km0+5LaMdrjj5B7dQ+4 /4lmcSJDmdsQQ== X-Nifty-SrcIP: [125.199.20.195] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Marc Herbert , Ulf Magnusson , Sam Ravnborg , Masahiro Yamada , 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 Message-Id: <1519776926-30459-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1519776926-30459-1-git-send-email-yamada.masahiro@socionext.com> References: <1519776926-30459-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Reviewed-by: Ulf Magnusson --- 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