From patchwork Fri Mar 23 19:52:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Stultz X-Patchwork-Id: 7438 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id B2E0F23E13 for ; Fri, 23 Mar 2012 19:52:34 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 74D8BA1845F for ; Fri, 23 Mar 2012 19:52:34 +0000 (UTC) Received: by iage36 with SMTP id e36so6707057iag.11 for ; Fri, 23 Mar 2012 12:52:33 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:x-content-scanned:x-cbid :x-gm-message-state; bh=sCWuahbMterpmxgUm0ACtwVbpKGQUCRACakCfF7gJmU=; b=K3XjP5YKMNI4JXTIx5qcVkg/zmxHgqRIqKPwSygh0+vWUcKreErujmwApNQTxTfaAP MZ9VwAFUhx30xSpm4t7qkW+mMJUxFzy0kdZbfguy1QgMSm9UTNy9GhQTnqAT0GY+ddB3 ueDQq6ksAPqlvrqtDB0s6oX9G2YszdVZlSIXDwJ/xaYp1cZK3sHg2ael5extFJVsP7hc Li+VL/KKcCEbV9wJTMEETVcsBMWvWaCQX8ZWNXp9ZpO+R6l4klVsTHPODR0ez5x4Kdkw nrPwXgkDrcZ15a8YOByD226kvl2t38CE4uKNiLh3fK5x3ChCGNhllIMauOriGNHK7vRI 8/Kg== Received: by 10.50.153.132 with SMTP id vg4mr2771352igb.2.1332532353901; Fri, 23 Mar 2012 12:52:33 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.203.79 with SMTP id fh15csp33223ibb; Fri, 23 Mar 2012 12:52:33 -0700 (PDT) Received: by 10.182.51.73 with SMTP id i9mr16538957obo.17.1332532353046; Fri, 23 Mar 2012 12:52:33 -0700 (PDT) Received: from e32.co.us.ibm.com (e32.co.us.ibm.com. [32.97.110.150]) by mx.google.com with ESMTPS id 1si5655447oex.35.2012.03.23.12.52.31 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 23 Mar 2012 12:52:33 -0700 (PDT) Received-SPF: pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) client-ip=32.97.110.150; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jstultz@us.ibm.com designates 32.97.110.150 as permitted sender) smtp.mail=jstultz@us.ibm.com Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 23 Mar 2012 13:52:31 -0600 Received: from d03dlp03.boulder.ibm.com (9.17.202.179) by e32.co.us.ibm.com (192.168.1.132) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Fri, 23 Mar 2012 13:52:29 -0600 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by d03dlp03.boulder.ibm.com (Postfix) with ESMTP id 6B9B419D804E; Fri, 23 Mar 2012 13:52:21 -0600 (MDT) Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q2NJqGpf116396; Fri, 23 Mar 2012 13:52:17 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q2NJqG10019946; Fri, 23 Mar 2012 13:52:16 -0600 Received: from kernel.beaverton.ibm.com (kernel.beaverton.ibm.com [9.47.67.96]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id q2NJqB1D019604; Fri, 23 Mar 2012 13:52:12 -0600 Received: by kernel.beaverton.ibm.com (Postfix, from userid 1056) id C394CC04C5; Fri, 23 Mar 2012 12:52:10 -0700 (PDT) From: John Stultz To: linux-kbuild@vger.kernel.org Cc: John Stultz , Michal Marek , Bruce.Ashfield@windriver.com, Darren Hart Subject: [PATCH 2/2] merge_config.sh: Add option to display redundant configs Date: Fri, 23 Mar 2012 12:52:08 -0700 Message-Id: <1332532328-32529-1-git-send-email-john.stultz@linaro.org> X-Mailer: git-send-email 1.7.3.2.146.gca209 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12032319-3270-0000-0000-00000506461F X-Gm-Message-State: ALoCoQma/28s6vtGQC0TvwcJUBd6BhADQjgbzFN/Aui2dV+UZMtLAoxexjFO70wQ5+NFDVLayBNU Provide a -r option to display when fragments contain redundant options. This is really useful when breaking apart a config into fragments, as well as cleaning up older fragments. v2: Now w/ spelling fixes! Thanks Darren! CC: Michal Marek CC: Bruce.Ashfield@windriver.com CC: Darren Hart Signed-off-by: John Stultz --- scripts/kconfig/merge_config.sh | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-) diff --git a/scripts/kconfig/merge_config.sh b/scripts/kconfig/merge_config.sh index ceadf0e..ad8c76e 100755 --- a/scripts/kconfig/merge_config.sh +++ b/scripts/kconfig/merge_config.sh @@ -31,10 +31,12 @@ usage() { echo " -h display this help text" echo " -m only merge the fragments, do not execute the make command" echo " -n use allnoconfig instead of alldefconfig" + echo " -r list redundant entries when merging fragments" } MAKE=true ALLTARGET=alldefconfig +WARNREDUN=false while true; do case $1 in @@ -52,6 +54,11 @@ while true; do usage exit ;; + "-r") + WARNREDUN=true + shift + continue + ;; *) break ;; @@ -79,6 +86,8 @@ for MERGE_FILE in $MERGE_LIST ; do echo Previous value: $PREV_VAL echo New value: $NEW_VAL echo + elif [ "$WARNREDUN" = "true" ]; then + echo Value of $CFG is redundant by fragment $MERGE_FILE: fi sed -i "/$CFG[ =]/d" $TMP_FILE fi