From patchwork Wed Jun 15 05:33:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 70084 Delivered-To: patch@linaro.org Received: by 10.140.106.246 with SMTP id e109csp2398717qgf; Tue, 14 Jun 2016 22:51:27 -0700 (PDT) X-Received: by 10.28.18.6 with SMTP id 6mr10052451wms.67.1465969887414; Tue, 14 Jun 2016 22:51:27 -0700 (PDT) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id wf4si39402404wjb.218.2016.06.14.22.51.27; Tue, 14 Jun 2016 22:51:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 6B89BA75CD; Wed, 15 Jun 2016 07:49:35 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JWXFlCMBh6ss; Wed, 15 Jun 2016 07:49:35 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C08E3A765F; Wed, 15 Jun 2016 07:48:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3352BA7519 for ; Wed, 15 Jun 2016 07:33:54 +0200 (CEST) Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id R1dmLrzMXLPe for ; Wed, 15 Jun 2016 07:33:54 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from conuserg-08.nifty.com (conuserg-08.nifty.com [210.131.2.75]) by theia.denx.de (Postfix) with ESMTPS id 41E20A7517 for ; Wed, 15 Jun 2016 07:33:00 +0200 (CEST) Received: from beagle.diag.org (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-08.nifty.com with ESMTP id u5F5WZeC021857; Wed, 15 Jun 2016 14:32:36 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-08.nifty.com u5F5WZeC021857 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1465968756; bh=OeBxujNqHHgAB/L3P85Pw0U6ZTu3tne6MGaZZ+ZgLx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qS/c0z8ZOBFTVGit7eS4lRXymPZGJ71nFax+XEvrproRrJFxQtkT3joitfGeW4T1v KnCYMs5OiXXdiGqStqZTH3oT3lyAfYgFcSjnYIx8jkphCpzCHia/HWtfJrHfdRQb90 wZb3/Kg6TMp78REI9M8I1Dv85p55/yQbgkZ4Sp7/8Oh+yHsU4P/8xcsN2NBmELzf8r GHbeR7ZMj2quuc3sGMAy3FX6gmS/I+00OVFkZ2tICNVwt8ZQCkCwd/MIaSBlJCQ5lV vuxqzlNXhUbXyxu1Q3WBuyLest8fcSrukGcflPUyT/1/WQGpmpi8RczbTGYdQXin48 V19aJK4aCV2kw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 15 Jun 2016 14:33:50 +0900 Message-Id: <1465968834-17361-2-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1465968834-17361-1-git-send-email-yamada.masahiro@socionext.com> References: <1465968834-17361-1-git-send-email-yamada.masahiro@socionext.com> Cc: Joe Hershberger Subject: [U-Boot] [PATCH 1/5] tools: moveconfig: fix needless move for config with default 1 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" When moving an integer type option with default value 1, the tool moves configs with the same value as the default (, and then removed by the later savedefconfig). This is a needless operation. The KconfigParser.parse_one_config() should compare the config after the "=y -> =1" fixup. Signed-off-by: Masahiro Yamada --- tools/moveconfig.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) -- 1.9.1 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/tools/moveconfig.py b/tools/moveconfig.py index 238e961..06ff4d9 100755 --- a/tools/moveconfig.py +++ b/tools/moveconfig.py @@ -487,9 +487,6 @@ class KconfigParser: else: new_val = not_set - if old_val == new_val: - return (ACTION_NO_CHANGE, new_val) - # If this CONFIG is neither bool nor trisate if old_val[-2:] != '=y' and old_val[-2:] != '=m' and old_val != not_set: # tools/scripts/define2mk.sed changes '1' to 'y'. @@ -498,7 +495,8 @@ class KconfigParser: if new_val[-2:] == '=y': new_val = new_val[:-1] + '1' - return (ACTION_MOVE, new_val) + return (ACTION_NO_CHANGE if old_val == new_val else ACTION_MOVE, + new_val) def update_dotconfig(self): """Parse files for the config options and update the .config.