From patchwork Wed Jan 10 06:56:11 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 124023 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4924141qgn; Tue, 9 Jan 2018 22:57:36 -0800 (PST) X-Google-Smtp-Source: ACJfBotIcTlMVdD3cCGaM2v4uvQ9QyfIGwlwhuPOPnImPTAYxLKPMstPX02kpZZRHkkN6dJAukZp X-Received: by 10.84.128.71 with SMTP id 65mr18320442pla.282.1515567456113; Tue, 09 Jan 2018 22:57:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515567456; cv=none; d=google.com; s=arc-20160816; b=DJBlZV/MZuwRj/YwZE9lOYooqCOyx34MiFyf0uqEA4mFSvWZqsPC6wddFZV1QqLv3E ot8u2EEqbKAE8sVSyVg64SJsFo/Sfe+nX63V0b6C//P7/xEVcfi5zVBignodm1/87ffa 5l52RwT/Uvjzy7B7bOD9IkghQR1gcMkn3HpxvgTv4yum36hpXG56BeWIM3kfjyHtz0ry HptF1MWpRu8tNhcJJ6p9agZFRfzZRHXNdsaXF3xKOJP58womotT6Y+58baNy4vtzMNBY uJbW7q67fH49AO98oJRwf9MwK/HTvMNveW7Qs9ZaJhp4X4J+xzUIeXGMbwKB5RVt4aJl Ji3A== 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=kov1RaOhmFeH+x92TYAwGwar3USzVtkZfrmfR/isIks=; b=Jg/TO/RY/iicuvAmipJxsGerxf6ATfLIHdQhYdoiP8bTp8IP16om+FtEexgVuaCTXn n9Y4AJE4Qf+iExSa3PBicd2fhHVM0SRiUVifBdOdP0pBSuo+SHjuPHCwMqNW9fAyEnfa X2bWV1LnggHTdFSOFuZsxjrZIYhQXGR3IZdxcww9wkQq246PtwU1qfC+lFlPYWgv3lWz A0+V88W0L0EGdRJxTaUrhxi6xYLS8ZJXi/RGtZgVkBBLBARgwrWQ7J/cSv7fb2yutmFH Iw/ULnX99cT3wUbL61zEl7ArSRibg01QLDg5gPA48BF5Zv/4CXy2Zc+bmGcUdnug8iq/ 5i/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=LWWTKf+B; 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 j19si11487062pll.586.2018.01.09.22.57.35; Tue, 09 Jan 2018 22:57:36 -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=LWWTKf+B; 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 S1753730AbeAJG5d (ORCPT + 28 others); Wed, 10 Jan 2018 01:57:33 -0500 Received: from conuserg-08.nifty.com ([210.131.2.75]:22640 "EHLO conuserg-08.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752280AbeAJG51 (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 w0A6uM2l020629; Wed, 10 Jan 2018 15:56:24 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com w0A6uM2l020629 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1515567385; bh=kov1RaOhmFeH+x92TYAwGwar3USzVtkZfrmfR/isIks=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LWWTKf+BvbZdffVqTFzgIrIcDXLA01lFFL33CPpK9C+mUCHJU5RFuuXb0gK3XnY+G FXZ8ng1FDlVhX+FTt6CirB1/tp3rW6Eu8H18xs6NAOvW2LexpYqd6tvitb6PpeYw3p ikhEjhMMsg7xh/2Juv0fGXaW7rDujpOxTZFPdayF3PwATJ7+pyy88x0fnh3xPNP20W Y5Udm0tiSTTJx3JM9JxqCr+l3TStgbxieuFtOBnqJyaBa59W0q+N1zaNuY1Td1jBYQ rzckndN9/hUAXbYFJaMzc2BtK6XfkyZQMEyS9kCVlTSfEB7aecwTPpN86iHs+TvKJd tQoUPFPtC2+vg== 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 3/6] kconfig: do not call conf_set_all_new_symbols() for (all)defconfig Date: Wed, 10 Jan 2018 15:56:11 +0900 Message-Id: <1515567374-12722-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515567374-12722-1-git-send-email-yamada.masahiro@socionext.com> References: <1515567374-12722-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 (all)defconfig does not need to call conf_set_all_new_symbols() because conf_write() calculates all symbols based on their default unless they have been user-defined. conf_set_all_new_symbols(def_default) is no-op except for "choice". It calls sym_cal_value() for "choice", but the SYMBOL_VALID is cleared by set_all_choice_values() later on. So, conf_write() will re-calculate it, which is just a wasteful computation. The only difference I see is SYMBOL_DEF_USER flag for "choice", but it gives no difference to the resulted .config file. I confirmed this change still produced the same .config for all ARCH. I also moved savedefconfig to collect the no-op cases at the end of the switch statement. Signed-off-by: Masahiro Yamada --- scripts/kconfig/conf.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) -- 2.7.4 diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 52cbe5d..8364811 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -655,18 +655,10 @@ int main(int ac, char **av) case allmodconfig: conf_set_all_new_symbols(def_mod); break; - case alldefconfig: - conf_set_all_new_symbols(def_default); - break; case randconfig: /* Really nothing to do in this loop */ while (conf_set_all_new_symbols(def_random)) ; break; - case defconfig: - conf_set_all_new_symbols(def_default); - break; - case savedefconfig: - break; case oldaskconfig: rootEntry = &rootmenu; conf(&rootmenu); @@ -681,7 +673,10 @@ int main(int ac, char **av) check_conf(&rootmenu); } while (conf_cnt && input_mode != listnewconfig); break; + case alldefconfig: + case defconfig: case olddefconfig: + case savedefconfig: default: break; }