From patchwork Wed Jan 10 06:56:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 124026 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4925026qgn; Tue, 9 Jan 2018 22:58:49 -0800 (PST) X-Google-Smtp-Source: ACJfBot+SLXJTgISuxXb/sa41sjbnPpcgiWwL+J4+AQ/P6JFrnkvz/aZQWchHhAlbZuCgR+6DARY X-Received: by 10.98.135.76 with SMTP id i73mr8364284pfe.183.1515567529464; Tue, 09 Jan 2018 22:58:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515567529; cv=none; d=google.com; s=arc-20160816; b=t1dNjWEZZbyuA/XTsOZ30VVqXz7KktEfA8w+cWChaVUabD1DITpGH4NXJcEH/FVx6U 6HqQisGwpOQ6aIxdAWo/PpB1DeryPVQ4t+I8mjBi1R5/v207GjP/rt8B71+H/ZUCr8+2 dRhoJNEcZhviV2MAJ/UyBBIJ4yN31EvdH4NZyrsxhntR/Psoe8lOX69Gdm9r2lKGgMXp aOyy93ntNqwrZZtYNWWJbe840RJTQxHNBBRiJ9uGo891yZmUY2pLL0S6yppG8OtC8Vc2 HO2JBMgqkEtbTm9K3jdgV9b8NhmMWq0SG6TN52KwxkLgRSQE4/u0wYUDQ1FtoBlMVucH aelg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature:dkim-filter:arc-authentication-results; bh=PQeMC+9dmrlwnUxCepFOOnNlaQtsR9RxDtrErMK0Cdg=; b=g3gzFpgPViDBe7WeQKbOwtLs9sr6lTVNnMPcwYl9/+r7VPxnh4gdCWBKbw5h24j6um Rwnnh40l2eaKfggV1srizy5mtqhmXzCY9fxv2pGxlokxYgMC/7IJ5p7qOCoWdqLTLPE5 KqCFPtr9Ewt6/OfnA9iqBC1ZijaIpVu89kHQ9RjyzoGWQuQEJSwnQUagej7KhgzLyg6w BgYeICdW777POuE+s+LEf251/qW2wRzoXdRNc3Q+qzDbz3eDwC6P0RSU0lFiC/rFralE 4eqqJbU1qIWlVECd89OqawwEV4UheCNDe7Hm0ZpYIKW5hYqy/exE4Y/6dkp7MWg2vnY5 u4+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=aVMa9neW; 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 r3si6279203pfi.402.2018.01.09.22.58.49; Tue, 09 Jan 2018 22:58:49 -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=aVMa9neW; 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 S1753825AbeAJG5e (ORCPT + 28 others); Wed, 10 Jan 2018 01:57:34 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:22641 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753544AbeAJG51 (ORCPT ); Wed, 10 Jan 2018 01:57:27 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id w0A6uM2j020629; Wed, 10 Jan 2018 15:56:23 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0A6uM2j020629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1515567383; bh=PQeMC+9dmrlwnUxCepFOOnNlaQtsR9RxDtrErMK0Cdg=; h=From:To:Cc:Subject:Date:From; b=aVMa9neWF4cjWcad04M6ls6xLl0uG7gnnSnOPLuxWV8k5BfKlmjvjWaUBh1u7unZ2 e6uQl9pIwZsIti8ynMGnT429gRBvX0l9II+dwFDHJTFa2u0ziQYEEaKGo4nCreeiKR fOODaparxZdBLKAkIMV/Y7yZ8WcpAUV+rABGo8gUEP3O4AN26TSM5zNSGAF95O3EZn 6qLVRCXOFfLkU8jF4M4IUMSu9aVlIduVnmDGkdohZt4QBSSrnc4y3n9pAAOiIOglPd 6TnqaC1tGoduy4mcNW3LRrfOI7z4QfOOf1J+HEyPMjBpOCvvnTdJNDhvbladMH5q6r eqUNAbWKct1Jg== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Sam Ravnborg , Michal Marek , Ulf Magnusson , Marc Herbert , Masahiro Yamada , linux-kernel@vger.kernel.org Subject: [PATCH 1/6] kconfig: do not call check_conf() for olddefconfig Date: Wed, 10 Jan 2018 15:56:09 +0900 Message-Id: <1515567374-12722-1-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 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. 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(-) -- 2.7.4 Acked-by: Ulf Magnusson 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; }