From patchwork Wed May 25 05:36:44 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 814972 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4P5arqw018233 for ; Wed, 25 May 2011 05:36:53 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752484Ab1EYFgw (ORCPT ); Wed, 25 May 2011 01:36:52 -0400 Received: from mail-iw0-f174.google.com ([209.85.214.174]:47618 "EHLO mail-iw0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752443Ab1EYFgv (ORCPT ); Wed, 25 May 2011 01:36:51 -0400 Received: by iwn34 with SMTP id 34so6142254iwn.19 for ; Tue, 24 May 2011 22:36:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:from:to:cc:subject:date:message-id:x-mailer; bh=hwghVK1OSujZ20zOZ+FjVI+kljjLign2+jX++Iqpx9E=; b=XRmms9tobzNzDH8TSSZxkBWyQO0rV7uwltyvdC75wUdB6wyyAMrox5GIX2+2z62Dcp 5JwwN3x2w6tqxcWJ/dmhxogQayAjpc7fl2/61LkinR1RKvB5OGDd789TP4cegQsrwzv3 LXsFxAJfJUoykhlZjZ2lfMdJeDarLLOCz6lwk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=o5uu4ZmXhtTRuS2xjIPTHxrA3zaYDsVGbsjDWVpPDJginW140fX1NDEVBp9xzktLna fEZOR/0n+uolV9n4BvblaiJOJ88MXN34cTJI3d5U9/dIh1uKlgJwnXRmwUYMA7CNOjsM fwYoNp1xrIWz83oh8L0k2UsitCqgpOMH9L2+Q= Received: by 10.42.178.9 with SMTP id bk9mr7125126icb.245.1306301810844; Tue, 24 May 2011 22:36:50 -0700 (PDT) Received: from localhost.localdomain (76-10-146-236.dsl.teksavvy.com [76.10.146.236]) by mx.google.com with ESMTPS id b3sm540350icy.7.2011.05.24.22.36.49 (version=SSLv3 cipher=OTHER); Tue, 24 May 2011 22:36:50 -0700 (PDT) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Arnaud Lacombe Subject: [PATCH] kconfig: do not overwrite symbol direct dependency in assignment Date: Wed, 25 May 2011 01:36:44 -0400 Message-Id: <1306301804-12319-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.3.4.574.g608b.dirty Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 25 May 2011 05:36:53 +0000 (UTC) Considering the following configuration: config F bool "F" choice AB bool "AB" config A bool "A" config B bool "B" endchoice if A config D bool default y if F select E config E bool "E" endif if B config D bool default y if F select E config E bool "E" endif The following configuration: CONFIG_F=y CONFIG_A=y CONFIG_D=y CONFIG_E=y emits a spurious warning: (D) selects E which has unmet direct dependencies (B) If a symbol appears in two different branch of the tree, it should inherit the dependency of both parent, not just the last one. Reported-by: Yann E. Morin Tested-by: Yann E. Morin Signed-off-by: Arnaud Lacombe --- scripts/kconfig/menu.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 5fdf10d..d0c65e7 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -350,7 +350,7 @@ void menu_finalize(struct menu *parent) last_menu->next = NULL; } - sym->dir_dep.expr = parent->dep; + sym->dir_dep.expr = expr_alloc_or(sym->dir_dep.expr, parent->dep); } for (menu = parent->list; menu; menu = menu->next) { if (sym && sym_is_choice(sym) &&