From patchwork Mon Jan 20 15:34:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Steven Rostedt X-Patchwork-Id: 3513341 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4592C9F2D6 for ; Mon, 20 Jan 2014 15:34:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9C5ED20142 for ; Mon, 20 Jan 2014 15:34:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 66D2420173 for ; Mon, 20 Jan 2014 15:34:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753776AbaATPeI (ORCPT ); Mon, 20 Jan 2014 10:34:08 -0500 Received: from cdptpa-outbound-snat.email.rr.com ([107.14.166.226]:32085 "EHLO cdptpa-oedge-vip.email.rr.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753737AbaATPeH (ORCPT ); Mon, 20 Jan 2014 10:34:07 -0500 Received: from [67.255.60.225] ([67.255.60.225:52366] helo=gandalf.local.home) by cdptpa-oedge01 (envelope-from ) (ecelerity 3.5.0.35861 r(Momo-dev:tip)) with ESMTP id F9/E0-02594-CE14DD25; Mon, 20 Jan 2014 15:34:04 +0000 Date: Mon, 20 Jan 2014 10:34:03 -0500 From: Steven Rostedt To: Linus Torvalds Cc: LKML , Andrew Morton , linux-kbuild@vger.kernel.org Subject: [GIT PULL] localmodconfig: Add config depends by default settings Message-ID: <20140120103403.33012eb2@gandalf.local.home> X-Mailer: Claws Mail 3.9.3 (GTK+ 2.24.22; x86_64-pc-linux-gnu) MIME-Version: 1.0 X-RR-Connecting-IP: 107.14.168.118:25 X-Cloudmark-Score: 0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Linus, While debugging the problem with localmodconfig and the ALSA codec modules all being set, I discovered a small bug in the dependency logic. If a config has a dependency based on its setting value, localmodcondig misses it. For example: config FOO default y if BAR || ZOO If FOO is needed for a module and is set to '=m', and so are BAR or ZOO, localmodconfig will not see that BAR or ZOO are also needed for the foo module, and will incorrectly disable them. Please pull the latest localmodconfig-v3.14 tree, which can be found at: git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-kconfig.git localmodconfig-v3.14 Tag SHA1: 3e4892e9201af46ba6df30b7bb8925da06f28cbc Head SHA1: 95edca5c523c4b404dd60baa0a1bea0e4c38fd72 Steven Rostedt (Red Hat) (1): localmodconfig: Add config depends by default settings ---- scripts/kconfig/streamline_config.pl | 7 +++++++ 1 file changed, 7 insertions(+) --------------------------- commit 95edca5c523c4b404dd60baa0a1bea0e4c38fd72 Author: Steven Rostedt (Red Hat) Date: Wed Dec 18 12:35:20 2013 -0500 localmodconfig: Add config depends by default settings Currently localmodconfig will miss dependencies from the default option. For example: config FOO default y if BAR || ZOO If FOO is needed for a module and is set to '=m', and so are BAR or ZOO, localmodconfig will not see that BOO or ZOO are also needed for the foo module, and will incorrectly disable them. Link: http://lkml.kernel.org/r/20131218175137.162937350@goodmis.org Signed-off-by: Steven Rostedt --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/scripts/kconfig/streamline_config.pl b/scripts/kconfig/streamline_config.pl index 4606cdf..3133172 100644 --- a/scripts/kconfig/streamline_config.pl +++ b/scripts/kconfig/streamline_config.pl @@ -219,6 +219,13 @@ sub read_kconfig { $depends{$config} = $1; } elsif ($state eq "DEP" && /^\s*depends\s+on\s+(.*)$/) { $depends{$config} .= " " . $1; + } elsif ($state eq "DEP" && /^\s*def(_(bool|tristate)|ault)\s+(\S.*)$/) { + my $dep = $3; + if ($dep !~ /^\s*(y|m|n)\s*$/) { + $dep =~ s/.*\sif\s+//; + $depends{$config} .= " " . $dep; + dprint "Added default depends $dep to $config\n"; + } # Get the configs that select this config } elsif ($state ne "NONE" && /^\s*select\s+(\S+)/) {