From patchwork Wed Feb 28 00:15:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129873 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp412630lja; Tue, 27 Feb 2018 16:16:56 -0800 (PST) X-Google-Smtp-Source: AH8x2275iMcNYLmH2e+mFzSJ/0Dxbp41lwTuMnC92Pk2u4+NZxTUSgLXLngtB2Lw+LPIN22C7ZGp X-Received: by 2002:a17:902:9a04:: with SMTP id v4-v6mr15695836plp.252.1519777016154; Tue, 27 Feb 2018 16:16:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777016; cv=none; d=google.com; s=arc-20160816; b=HCwu0sXvc+2JWpumLFaVKXMIkBmQlhcoF6ZwFiWnwg/3knhuO3VeX2EoT0IVQVhaG3 Nw0GTFDCjNnPuYz47sjICIfnDZdoAKLG739T27ZTk9yTjPDQRkFQOiimkrayGxWU2fS+ 2fXDXQQ3RZOrOsITLyrqEMfgMPmk3d1BCA1/lVxYRsxBBSyzB53t6/dNjQgJVlIC7Xnt H0V8rpwrMDiL/f5R5nMio4S0kbKa7s5IWcYakKFMXjv2lzUnzL8RKUUW+A6lqJ8ICBG8 UHD1/qyqf21OjdJg0Fcamtf/H+YGlKrww/eTlihb7jouFLx3TNA0opG+72lNU/zdzUuM O9Yg== 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 r5si217096pgf.434.2018.02.27.16.16.55; Tue, 27 Feb 2018 16:16:56 -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 S1751973AbeB1AQv (ORCPT + 28 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(-) -- 2.7.4 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; } From patchwork Wed Feb 28 00:15:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129877 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp413231lja; Tue, 27 Feb 2018 16:17:45 -0800 (PST) X-Google-Smtp-Source: AH8x2243Anbj0bv98cW0y0Xu7DGwVO2r/vjXTUbdj7fuiaQwf+7jiFihIBS3R44H6qqhWsItRnoc X-Received: by 10.99.165.9 with SMTP id n9mr12735302pgf.324.1519777065365; Tue, 27 Feb 2018 16:17:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777065; cv=none; d=google.com; s=arc-20160816; b=DA5XRFtlc+9P0JQdJ3flhDg0e+ohYeV3jKH3Qkp6BWNdhi8oIHkClS9tZIu24C/8lx RQbajYUAub7ntP2OBFcTo50HmFlYbqqB/rCGpLuSmxZE8zN5sVaIrFmyAX1RfdH5Aj8a iTp9IH199H3vxzM/KfyS4lC1hfW18TcMpt7xB7ryq35J+y/A+ps4qEHc2mUgb2YyjuzJ uJ91EnKP0tM2dKfrJ9RPB/uXVVGo5VxE0wHqt/Rj45nYxXecmNCxwXHCwR0maUCkNqb7 xaec6ju+INf8CpptNa736pQ3mskA25M1nzza9COS6fDqdt601+Sny2qVl9/qUvO/NCfc 51dg== 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=8QvPQfPqGzB0oKXjFZcaYDm6ixlWe1C29u/C9HogwiU=; b=Upx3YxTHQKE9vqXPBmRmToyuU2zXQfFuKHzomxTs5ahS2yhULf/Tyxm+6r5dqDf/+X HlWvnWrHkB1fkHGYkf4YS1S1nBdFpbmmInfKcKqLRPwlS2Ddl3HVuvniyk8dqTN/Mkbg dCpahZQ52tbby0m51/o87KTI7zGvsD1swMu/zZcIuhQ78sJ4CTD6SbqHy/PFTlwDbuHt YVSDK8wsvrc0vlp6LT3NlzmNF/Yrf6nz07IrmxuFIvg0wL2BUutBhw7XpngRG+NgYDz/ QFemub2ZGq7CwUKxG5WUxhfCc41JqkJmPu0ehhQ8uncqwxcide1tQzt08oXP5lglKun9 VWew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=r89hOPJE; 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 i124si215510pgc.589.2018.02.27.16.17.45; Tue, 27 Feb 2018 16:17:45 -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=r89hOPJE; 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 S1752046AbeB1ARl (ORCPT + 28 others); Tue, 27 Feb 2018 19:17:41 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24336 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751890AbeB1AQs (ORCPT ); Tue, 27 Feb 2018 19:16:48 -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 w1S0Fahm000353; Wed, 28 Feb 2018 09:15:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Fahm000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776938; bh=8QvPQfPqGzB0oKXjFZcaYDm6ixlWe1C29u/C9HogwiU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r89hOPJEQED6veulSjtC9qqJm3ed7L4jrkyS8kKuoYI8yrnKbCQ6aRalTcUUw6/c1 9eNBjxFDPL6J6mxP9+zywi+qwgDjpiV4IqzqTqoLEbh+RhO4ntKjkT5hx7yGSCzlcj xSJVesctQt0ETNBR4a4VQdL9X2Sik3tUs5NGoIBGVQrB5s93BfUugEBROGaX0KcjYP JhUTp4K0ol9J262iCnMe/tyQB31O4+D29uZLibWh91m2KMxLjMbIuhRgQgeqXSQ0g9 DoCFzQagbM2cKQgGBjP63/z5ZRp0UObVxGeZyTpposDETPMaDlzIyKtDoBMZNLgvei UEoJBm0AWHuZQ== 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 2/6] kconfig: remove unneeded input_mode test in conf() Date: Wed, 28 Feb 2018 09:15:22 +0900 Message-Id: <1519776926-30459-3-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 conf() is never called for listnewconfig / olddefconfig. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v2: None scripts/kconfig/conf.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 4227d3b..1faa55f 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -358,9 +358,7 @@ static void conf(struct menu *menu) switch (prop->type) { case P_MENU: - if ((input_mode == silentoldconfig || - input_mode == listnewconfig || - input_mode == olddefconfig) && + if (input_mode == silentoldconfig && rootEntry != menu) { check_conf(menu); return; From patchwork Wed Feb 28 00:15:23 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129876 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp413101lja; Tue, 27 Feb 2018 16:17:35 -0800 (PST) X-Google-Smtp-Source: AH8x226rf4DuWViVPnrYin6uk5bxn5Pc8WS2lz1ts7xG6T6uoZT/p3ctcKmF+OfTBVvllgyM1BhL X-Received: by 10.99.125.19 with SMTP id y19mr12370949pgc.285.1519777055328; Tue, 27 Feb 2018 16:17:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777055; cv=none; d=google.com; s=arc-20160816; b=sh9JoXAKF4mU4RNfSZijIwt5wgzu8RBhhgGTJIiKdK+Tmo8yLB/rougAZSRPtaCp2t 4W20EegTlT6C4tct54D6oI7NLK+m5C6GhIhC/3XiqXo7kPsXnLr4JzcGK49dEUqDwCwR uaoWIS4sQ/B3Lx/44XINgxbjcmV0MM4HHxafQH5D9HdGJZ9VebNsUp4RJPWdRoSyOOgr broG/C1fWLQDd/5av15Mpre/nl7kihJ48aCo3+RszO6ev2bu8rK0EJJeEGh4hY3fDFYp ZC6blcqxEnPLqa10S3AT0XzElxjdTTJx2Tg7MvNOfUVVUSUeymqFdZ+6axspNgLjOGpr jnGQ== 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=63zj14JnX2Pb9Ksef74bjBN++xc6KgvLl2R16nhUpWg=; b=caoUBHlvgurGOtI7O9uuamKnvC/+Wki3MDIkbutF/4QDSFiLDDQjOC1OqfT1LuQs2M +bTUX/AoZ588WQM3Tf0n1lTWC3yVd8Pg9nLWNmFcxLRcD70t+x5ywaICnF2bkqcsqSEe ad6mSPjviiLN4gMNSLA9oBfmHvvVMm6BHdFAXROtIA98XuB+gSYPEHiiB6WCDLQ//KOi QkRYcUHRrPMMhUqhJnD5eunqhHD5HpjeNuFKWhJSKpoXd7v4zdegcKKuQLATblxQ6Ta0 tvh6MO3PYqDvA/vmVWw9rFMwHGl4LT6zN8ELT/cW1L4J8Xr1uzeqWFj0FhHaJ1VEgoJh uB/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=mz0Y9n7E; 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 i124si215510pgc.589.2018.02.27.16.17.34; Tue, 27 Feb 2018 16:17:35 -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=mz0Y9n7E; 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 S1751953AbeB1AQt (ORCPT + 28 others); Tue, 27 Feb 2018 19:16:49 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24306 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751706AbeB1AQr (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 w1S0Fahn000353; Wed, 28 Feb 2018 09:15:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Fahn000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776939; bh=63zj14JnX2Pb9Ksef74bjBN++xc6KgvLl2R16nhUpWg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mz0Y9n7EqVIcnaR3N/CEye7m+jx1ztkzSbdySqUdl796GLTBkPyMRY28Ai2qqZa1y FAc9codvosW3PI+PtRQthszGRcb7mXA3NBCRGNrQSddTAATXp4LYydMc+Z7YB90qdt F9lBaDIWpPPI0QWwQxyNqcCkLLcTJEkhoCVrP5hr73z4XbC43CdIk1+aya5jG21j51 uLAppDeqexq9fMuu86sxIy75XWf4Zcq9b4gDJfzslVq5jkLi0wawGsi0YJPo1Qwolz b+JsDAcwPU4T5nsFoPPoQKXneRIE87tHt2MPV1E4cmXGYENqCn6gii7It9UNZVXbRD 37zLz8yTYPpIg== 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 3/6] kconfig: remove redundant input_mode test for check_conf() loop Date: Wed, 28 Feb 2018 09:15:23 +0900 Message-Id: <1519776926-30459-4-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() never increments conf_cnt for listnewconfig, so conf_cnt is always zero. In other words, conf_cnt is not zero, "input_mode != listnewconfig" is met. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v2: None scripts/kconfig/conf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.7.4 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 1faa55f..59656d3 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -669,7 +669,7 @@ int main(int ac, char **av) do { conf_cnt = 0; check_conf(&rootmenu); - } while (conf_cnt && input_mode != listnewconfig); + } while (conf_cnt); break; case olddefconfig: default: From patchwork Wed Feb 28 00:15:24 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129880 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp413814lja; Tue, 27 Feb 2018 16:18:30 -0800 (PST) X-Google-Smtp-Source: AH8x226HnlbArZJJqGMl0e564u1pWR5Fp49Wo8h3zn6wzfsY6sjSFW9rIo1Qk1GzH+dLxCEp8BTo X-Received: by 10.101.85.143 with SMTP id j15mr12465915pgs.387.1519777110148; Tue, 27 Feb 2018 16:18:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777110; cv=none; d=google.com; s=arc-20160816; b=MCzZdT5oZKcnSlG05740llWWHWOQj43bLQdIwYb1JCy7PV6dc75UxH5j9p4FA9XoSf PAoIPU/HKW+Cwm259TascajU/QJPuo0dMJn8sY8BhOtKZNfWAWRWkAg+/tUmtYWcYz2+ hFNuV/UHxm2uKLTG1xVc271hrPsmhEi99lTQwuKZ4dQmMGtO3hmsOiV7z4D1sVH3duVr OXEuIM8P40K9nCfzCxjhUTQMM7uLq2Es2BoOmLrZnKaGak7kR+q+Rx1iITOUdPTVrAf6 Myz7zK/mVwX3zGfLLClT6EnJMCYl8Yow77gLYgYuAxi0rVoj+kNEzMgWGlPuehs3HxPx qy9A== 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=lmK+d8ZnQJL8C3XpYQ33ITW1tPqb2/Mo9zxysMJHUsk=; b=KH3HPHPJc2sSiNdwc7RNhvZC6fien1CAeb+/YQ1rnHC+mkAsj799ZsrF6CDl1YYs+/ HJ4Rfj/hUDW7U/uXpC6cVIav4PX6U4wkC0fRfsChvOTQccQaZ0Ghz3hxfeTDjWPa0VJP vLVzN79hBQ8c7TRcnHfzRnakDp8VI5qPa3lWGm4ibS1iaWTqJG7OY1evIkNItHHXQhwo o0H8ITQeyu9TnRU+xRANif9De/cS4Ztzylxly5SwfiXu4dEbWhkf9l6bQE8Zh1/3Mcjj M8nvuoFEqzsNF7d0V7zZyXMD+u9RER9C6YfiMRnyPa+ivgjQdWcuVL1qQLD768o/5+pZ olVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Pzal9c8H; 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 x7-v6si275662pln.666.2018.02.27.16.18.29; Tue, 27 Feb 2018 16:18:30 -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=Pzal9c8H; 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 S1751889AbeB1ASY (ORCPT + 28 others); Tue, 27 Feb 2018 19:18:24 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24339 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751898AbeB1AQs (ORCPT ); Tue, 27 Feb 2018 19:16:48 -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 w1S0Faho000353; Wed, 28 Feb 2018 09:15:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Faho000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776939; bh=lmK+d8ZnQJL8C3XpYQ33ITW1tPqb2/Mo9zxysMJHUsk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Pzal9c8HLRA/21I32HavKZkFdC1hy8EIdVKQj7Q6U6UwramZ0F4Jg1mcOKZt4Yo8o McIJYa4sfzrDcDyc7ACBGfgzCiCzy0Aq3NmRcs/f0YCGksjT3fvKczvVgGt7romG0q kLtZCUpO3kRuV3IVJGWQIovYtCze/3i7TdRvOOaLYMlSywNh5mnMhVwqdzDyDRybTX LxyTAbu3R6YF0XIzp/0jakCO9zGJ3r0AIQFwISwv4jG4/C08nRoAv9UzdkN5f7UkW0 fNE4XuNbJ1Cb73h8wy/R3V71fdcMDvyLbpYuOcdMnRsIwwSwfCj4O+oFelvKpG8bpj Fzk+8bUo1Hv7w== 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 4/6] kconfig: hide irrelevant sub-menus for oldconfig Date: Wed, 28 Feb 2018 09:15:24 +0900 Message-Id: <1519776926-30459-5-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 Historically, "make oldconfig" has changed its behavior several times, quieter or louder. (I attached the history below.) Currently, it is not as quiet as it should be. This commit addresses it. Test Case --------- ---------------------------(Kconfig)---------------------------- menu "menu" config FOO bool "foo" menu "sub menu" config BAR bool "bar" endmenu endmenu menu "sibling menu" config BAZ bool "baz" endmenu ---------------------------------------------------------------- ---------------------------(.config)---------------------------- CONFIG_BAR=y CONFIG_BAZ=y ---------------------------------------------------------------- With the Kconfig and .config above, "make silentoldconfig" and "make oldconfig" work differently, like follows: $ make silentoldconfig scripts/kconfig/conf --silentoldconfig Kconfig * * Restart config... * * * menu * foo (FOO) [N/y/?] (NEW) y # # configuration written to .config # $ make oldconfig scripts/kconfig/conf --oldconfig Kconfig * * Restart config... * * * menu * foo (FOO) [N/y/?] (NEW) y * * sub menu * bar (BAR) [Y/n/?] y # # configuration written to .config # Both hide "sibling node" since it is irrelevant. The difference is that silentoldconfig hides "sub menu" whereas oldconfig does not. The behavior of silentoldconfig is preferred since the "sub menu" does not contain any new symbol. The root cause is in conf(). There are three input modes that can call conf(); oldaskconfig, oldconfig, and silentoldconfig. Everytime conf() encounters a menu entry, it calls check_conf() to check if it contains new symbols. If no new symbol is found, the menu is just skipped. Currently, this happens only when input_mode == silentoldconfig. The oldaskconfig enters into the check_conf() loop as silentoldconfig, so oldaskconfig works likewise for the second loop or later, but it never happens for oldconfig. So, irrelevant sub-menus are shown for oldconfig. Change the test condition to "input_mode != oldaskconfig". This is false only for the first loop of oldaskconfig; it must ask the user all symbols, so no need to call check_conf(). History of oldconfig -------------------- [0] Originally, "make oldconfig" was as loud as "make config" (It showed the entire .config file) [1] Commit cd9140e1e73a ("kconfig: make oldconfig is now less chatty") made oldconfig quieter, but it was still less quieter than silentoldconfig. (oldconfig did not hide sub-menus) [2] Commit 204c96f60904 ("kconfig: fix silentoldconfig") changed the input_mode of oldconfig to "ask_silent" from "ask_new". So, oldconfig really became as quiet as silentoldconfig. (oldconfig hided irrelevant sub-menus) [3] Commit 4062f1a4c030 ("kconfig: use long options in conf") made oldconfig as loud as [0] due to misconversion. [4] Commit 14828349719a ("kconfig: fix make oldconfig") addressed the misconversion of [3], but it made oldconfig quieter only to the same level as [1], not [2]. This commit is restoring the behavior of [2]. Signed-off-by: Masahiro Yamada Reviewed-by: Ulf Magnusson --- Changes in v2: - Add a brief comment scripts/kconfig/conf.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 59656d3..11a4e45 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -358,8 +358,11 @@ static void conf(struct menu *menu) switch (prop->type) { case P_MENU: - if (input_mode == silentoldconfig && - rootEntry != menu) { + /* + * Except in oldaskconfig mode, we show only menus that + * contain new symbols. + */ + if (input_mode != oldaskconfig && rootEntry != menu) { check_conf(menu); return; } @@ -660,7 +663,7 @@ int main(int ac, char **av) case oldaskconfig: rootEntry = &rootmenu; conf(&rootmenu); - input_mode = silentoldconfig; + input_mode = oldconfig; /* fall through */ case oldconfig: case listnewconfig: From patchwork Wed Feb 28 00:15:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129879 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp413590lja; Tue, 27 Feb 2018 16:18:13 -0800 (PST) X-Google-Smtp-Source: AH8x224dAolvL4W4IXjo2rOPGyjXmDD/wuAVk6Rk572tRtLKP9qBnL42OWqFOu4X3/tj5NWK2Roh X-Received: by 2002:a17:902:9a98:: with SMTP id w24-v6mr15570605plp.188.1519777092942; Tue, 27 Feb 2018 16:18:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777092; cv=none; d=google.com; s=arc-20160816; b=bR627TIk7NVZjurEjokAnfRlmoi8/3GB/GTX/WQp4npKV3ePiC2HpKaD+3biXackSv E6uXZxnJf+l9MgVcSpL6p8lXbg5MLWObKCG4h4GuziYSL6b+bdIoAR4UnJiz0w/lIwjH vKnuzAUCJc7o1O1q6nLCtSBSzLFvNlcYkvS8ve1J08RQFyas5rQJyjwo78hShFfw2cZ8 IRVqIGKYn/mO2pokUoyE09iSBLsEwLZDxIeBG6aw56T2BQ/LOr1A+rkdZuYi3DgpWoX5 MbqIeFthchaAPisAGnHs94auqTgXqWe/D3rlgeO86n+sgmbZ/8z4Q2NjwdSKWwhT9FIQ WovA== 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=cSXUlsZaybBXgmOp0fwpZdvYCWJB08NKPhdsPewTnLU=; b=zFozuPtnE9bk3FgibOqvjRjyG4In+oowrv8xnxwMnpJWpZWWDImY49VQV1peQvC+0k 1tt+t6iEaq9GqOeUyyIZv7oZ4SIF4ZymaAhx26w779NTZ0b7k79rQyOBvHfnFHk7H9HS ag+HOKgZEM6NNbjA8NkUpo+95yxVRisr2ZC3sk/wFjuQFD0q3Tw4JnRJWzIrU5u1iLQ+ 3I5svsw/UkrcO9YBVG4jBUJ+v8xKIxAxI9v07icC/R/rNEjFWiWi30HvV+tNcgGD8+t5 r4nQNd5vKta9KTvyXFUgSi508KJ9wOrtr1qiLKtXfQ83AQbTV4yHU2YVIC+arZkEokDe 7qeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=E0TaNINB; 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 h4-v6si283153pls.39.2018.02.27.16.18.12; Tue, 27 Feb 2018 16:18:12 -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=E0TaNINB; 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 S1751863AbeB1ARj (ORCPT + 28 others); Tue, 27 Feb 2018 19:17:39 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24337 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751899AbeB1AQs (ORCPT ); Tue, 27 Feb 2018 19:16:48 -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 w1S0Fahp000353; Wed, 28 Feb 2018 09:15:39 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Fahp000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776940; bh=cSXUlsZaybBXgmOp0fwpZdvYCWJB08NKPhdsPewTnLU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=E0TaNINBP6FlYylQtM6xHWYyuzlzzk9IhrPhSzaO8+sXuJHcTZ+QKcwtj4gQXvE1b Ij6TEgNC21gBNejpHFhySGiKd+MnrTtnpiu4BCz2VqRNqBfhspX+ml0OyGkHuZRIEC JFuEQ0SMKt1UBioNZ3V0QwIqvUNPxOuW9Ql6YKzwePVQclKHXeMlDo+PyzsCvIb6E6 mf/BBoDRrpi6KBulwN+rkaQUds82mDSy2kWW9BKy4rooMOW9Un1VUSdSQwUP4a+e1l SH2C1qeuFAZdeU5cIlHSheKEw6BtFNR2/d66JS6U2Pd2/k78uXE1/c4U1vdv+dXcU/ 5kP7oUgktLt+A== 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 5/6] kconfig: invoke oldconfig instead of silentoldconfig from local*config Date: Wed, 28 Feb 2018 09:15:25 +0900 Message-Id: <1519776926-30459-6-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 The purpose of local{yes,mod}config is to arrange the .config file based on actually loaded modules. It is unnecessary to update include/generated/autoconf.h and include/config/* stuff here. They will be automatically updated during the build. Signed-off-by: Masahiro Yamada --- Changes in v2: - newly added scripts/kconfig/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Ulf Magnusson diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index c5d1d1a..bf9289a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -49,11 +49,11 @@ localyesconfig localmodconfig: $(obj)/streamline_config.pl $(obj)/conf cmp -s .tmp.config .config || \ (mv -f .config .config.old.1; \ mv -f .tmp.config .config; \ - $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \ + $(obj)/conf $(silent) --oldconfig $(Kconfig); \ mv -f .config.old.1 .config.old) \ else \ mv -f .tmp.config .config; \ - $(obj)/conf $(silent) --silentoldconfig $(Kconfig); \ + $(obj)/conf $(silent) --oldconfig $(Kconfig); \ fi $(Q)rm -f .tmp.config From patchwork Wed Feb 28 00:15:26 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 129875 Delivered-To: patch@linaro.org Received: by 10.46.66.2 with SMTP id p2csp412897lja; Tue, 27 Feb 2018 16:17:16 -0800 (PST) X-Google-Smtp-Source: AH8x226AUMYKsOp20/53YJakdbN53wKVyaMolNCSbBBq3k9KRknNkp0iGc/Wc5CBAP9a9PmCWO+u X-Received: by 10.99.45.194 with SMTP id t185mr11422624pgt.267.1519777036644; Tue, 27 Feb 2018 16:17:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519777036; cv=none; d=google.com; s=arc-20160816; b=oquXseDgiIHKf3H1hJamhPBbpcRkr9Wxjk8Wajen8rdaP4COte7wlzL69QTlkf8aaK 46ayh/a78tZ62A1x3rYEnZ3p7JvuUVkflCxm6cAnak6dtVlqsoKOOxz5mGDTk5LEfN7A Kl6352YY6BMuzKLZqOzGOsQ4giVnEU+6KqqomaRZxBRoeyWO8MVRXPZTuKik8eHp2UzS B0n+hQmRo1bQ5WASB63GzT6hE7soTe2FsH+2cyzGX7/WdcUaD0IrBalcxJEGtS6qcvgE 63FDPl0aEqBWqRwRzP7WeSxtrS0ebezzQgjyG6VoBdYbMavmvFfOjrgQYlCYtNcWXf8p xdsA== 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=1OqJHMwZpZu9T5xPrKE5JaVToxxxYpxwwNweR+yPBv0=; b=WC/XQTfqoPyTL+T5F2w8KZHK6EJ+G8gvG1l6xG5ohzeZULUg3tbn/LY3/1IvY4IALv bOa6/c0wO6RVXv70MmWbZXcNSI1JuyXwox61sjNI4V4syiW+e+zQEvXDiT4ymFPwZl8G BK2zVdjPM3MrKTC+FKU6Ib7exwY5mzepUhvOfNFB/pqjkmCcyUXNN0cGM/vkmiE6zjWL 24OhKyBThN/MMLogX70oBLXDCoqkGrs+PKKAr0fy7ZH4/eXFNba31IudXRY+aTBE4MD2 7DwcEclE1TJTD2mHr+ngcNCuwMcWhSXuVsEy8I6iTH/j9OJX/7mnz4SbePdirukJifLh mziw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=tOZIoBMT; 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 v23-v6si284455plo.276.2018.02.27.16.17.16; Tue, 27 Feb 2018 16:17:16 -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=tOZIoBMT; 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 S1752018AbeB1ARM (ORCPT + 28 others); Tue, 27 Feb 2018 19:17:12 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24522 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751813AbeB1AQz (ORCPT ); Tue, 27 Feb 2018 19:16:55 -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 w1S0Fahq000353; Wed, 28 Feb 2018 09:15:40 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com w1S0Fahq000353 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1519776941; bh=1OqJHMwZpZu9T5xPrKE5JaVToxxxYpxwwNweR+yPBv0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tOZIoBMT/sP3UvdEfBffXfFTmSvqhoQjLKtCsEGV2nxIbqD7vkqH/U6uX85UK/HCi Lf0i78qvgsmxLhBoqpFhz9NvVGbEzi2ZWgWPQ8rRB8hzSvDBu54AavzG9aIy2wbqK/ mLfu7RUe1zJ7x84QpSCA93aQdoPGuZ3RSfT6SKvTpDVYgOoOaycvXqaTrb+GiJkiPr hJFvXNOSXjyeHM/BvCajjpwpkdEhSi9V3i6epeuR/DSdFRd7ewTOSNIB18TZGm00Zo VuR68061BuXwYQc3cAq+a+pjqCCFOFgWNcAl8fvY0lnlyUC3lhgYUOpmlFfgneyWSZ VkxGhXfU991hQ== 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-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Jonathan Corbet , Michal Marek Subject: [PATCH v2 6/6] kconfig: rename silentoldconfig to syncconfig Date: Wed, 28 Feb 2018 09:15:26 +0900 Message-Id: <1519776926-30459-7-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 As commit cedd55d49dee ("kconfig: Remove silentoldconfig from help and docs; fix kconfig/conf's help") mentioned, 'silentoldconfig' is a historical misnomer. That commit removed it from help and docs since it is an internal interface. If so, it should be allowed to rename it to something more intuitive. 'syncconfig' is the one I came up with because it updates the .config if necessary, then synchronize other files with it. Signed-off-by: Masahiro Yamada --- Changes in v2: - newly added Documentation/kbuild/kconfig.txt | 2 +- Makefile | 2 +- scripts/kconfig/Makefile | 4 ++-- scripts/kconfig/conf.c | 20 ++++++++++---------- 4 files changed, 14 insertions(+), 14 deletions(-) -- 2.7.4 diff --git a/Documentation/kbuild/kconfig.txt b/Documentation/kbuild/kconfig.txt index bbc99c0..7233118 100644 --- a/Documentation/kbuild/kconfig.txt +++ b/Documentation/kbuild/kconfig.txt @@ -119,7 +119,7 @@ Examples: 15% of tristates will be set to 'y', 15% to 'm', 70% to 'n' ______________________________________________________________________ -Environment variables for 'silentoldconfig' +Environment variables for 'syncconfig' KCONFIG_NOSILENTUPDATE -------------------------------------------------- diff --git a/Makefile b/Makefile index 8706bf2..ea23d9b 100644 --- a/Makefile +++ b/Makefile @@ -598,7 +598,7 @@ $(KCONFIG_CONFIG) include/config/auto.conf.cmd: ; # include/generated/ and include/config/. Update them if .config is newer than # include/config/auto.conf (which mirrors .config). include/config/%.conf: $(KCONFIG_CONFIG) include/config/auto.conf.cmd - $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig + $(Q)$(MAKE) -f $(srctree)/Makefile syncconfig else # external modules needs include/generated/autoconf.h and include/config/auto.conf # but do not care if they are up-to-date. Use auto.conf to trigger the test diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index bf9289a..988258a 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile @@ -3,7 +3,7 @@ # Kernel configuration targets # These targets are used from top-level makefile -PHONY += xconfig gconfig menuconfig config silentoldconfig update-po-config \ +PHONY += xconfig gconfig menuconfig config syncconfig update-po-config \ localmodconfig localyesconfig ifdef KBUILD_KCONFIG @@ -36,7 +36,7 @@ nconfig: $(obj)/nconf # This has become an internal implementation detail and is now deprecated # for external use. -silentoldconfig: $(obj)/conf +syncconfig: $(obj)/conf $(Q)mkdir -p include/config include/generated $(Q)test -e include/generated/autoksyms.h || \ touch include/generated/autoksyms.h diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 11a4e45..4e08121 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -23,7 +23,7 @@ static void check_conf(struct menu *menu); enum input_mode { oldaskconfig, - silentoldconfig, + syncconfig, oldconfig, allnoconfig, allyesconfig, @@ -100,7 +100,7 @@ static int conf_askvalue(struct symbol *sym, const char *def) switch (input_mode) { case oldconfig: - case silentoldconfig: + case syncconfig: if (sym_has_value(sym)) { printf("%s\n", def); return 0; @@ -293,7 +293,7 @@ static int conf_choice(struct menu *menu) printf("[1-%d?]: ", cnt); switch (input_mode) { case oldconfig: - case silentoldconfig: + case syncconfig: if (!is_new) { cnt = def; printf("%d\n", cnt); @@ -441,7 +441,7 @@ static void check_conf(struct menu *menu) static struct option long_opts[] = { {"oldaskconfig", no_argument, NULL, oldaskconfig}, {"oldconfig", no_argument, NULL, oldconfig}, - {"silentoldconfig", no_argument, NULL, silentoldconfig}, + {"syncconfig", no_argument, NULL, syncconfig}, {"defconfig", optional_argument, NULL, defconfig}, {"savedefconfig", required_argument, NULL, savedefconfig}, {"allnoconfig", no_argument, NULL, allnoconfig}, @@ -468,8 +468,8 @@ static void conf_usage(const char *progname) printf(" --listnewconfig List new options\n"); printf(" --oldaskconfig Start a new configuration using a line-oriented program\n"); printf(" --oldconfig Update a configuration using a provided .config as base\n"); - printf(" --silentoldconfig Similar to oldconfig but generates configuration in\n" - " include/{generated/,config/} (oldconfig used to be more verbose)\n"); + printf(" --syncconfig Similar to oldconfig but generates configuration in\n" + " include/{generated/,config/}\n"); printf(" --olddefconfig Same as oldconfig but sets new symbols to their default value\n"); printf(" --oldnoconfig An alias of olddefconfig\n"); printf(" --defconfig New config with default defined in \n"); @@ -501,7 +501,7 @@ int main(int ac, char **av) } input_mode = (enum input_mode)opt; switch (opt) { - case silentoldconfig: + case syncconfig: sync_kconfig = 1; break; case defconfig: @@ -583,7 +583,7 @@ int main(int ac, char **av) } break; case savedefconfig: - case silentoldconfig: + case syncconfig: case oldaskconfig: case oldconfig: case listnewconfig: @@ -667,7 +667,7 @@ int main(int ac, char **av) /* fall through */ case oldconfig: case listnewconfig: - case silentoldconfig: + case syncconfig: /* Update until a loop caused no more changes */ do { conf_cnt = 0; @@ -680,7 +680,7 @@ int main(int ac, char **av) } if (sync_kconfig) { - /* silentoldconfig is used during the build so we shall update autoconf. + /* syncconfig is used during the build so we shall update autoconf. * All other commands are only used to generate a config. */ if (conf_get_changed() && conf_write(NULL)) {