From patchwork Sun Sep 26 20:22:03 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 210312 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id o8QKOV1W017038 for ; Sun, 26 Sep 2010 20:24:31 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755978Ab0IZUYa (ORCPT ); Sun, 26 Sep 2010 16:24:30 -0400 Received: from mail-qy0-f174.google.com ([209.85.216.174]:43342 "EHLO mail-qy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753851Ab0IZUYa (ORCPT ); Sun, 26 Sep 2010 16:24:30 -0400 Received: by qyk36 with SMTP id 36so4056808qyk.19 for ; Sun, 26 Sep 2010 13:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer; bh=GXkUDFmx+52Jn4FUgOfqPRk0p5udWd1rDCczIP1fCqU=; b=betzV+8vSFJ/cPQsWovDKLHyF+CbgTG9MdJVx8eXoI5soLFHg/MLrYXZU25Tok12wo a0UAN9br64ts42UJ6TWol8wT86lGkoVpLTqlHOPnV/PMPAISr8jESOXsuI05FxIO3bLX 3Hv6g1iYQRoPn7TiUsrVQXa67nsXmQT0Ho6v8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer; b=rOEUJV7EK4ZuW2wNHmDs0WMBIvgtgIrpipOsGSKSbq8BjTDblIkgq+UgTebgPOSX6u mfr0Enaagy8H3aHZO+KvEkFiRXsgPjbd26xhLidGaVYKSOhopygVCqcHHFzSX6If62hf sA7GhV2ccXerf3kEhTuWM7NzZ/x3ceiVUWYeE= Received: by 10.229.51.197 with SMTP id e5mr4825180qcg.234.1285532666243; Sun, 26 Sep 2010 13:24:26 -0700 (PDT) Received: from localhost.localdomain (69-165-136-93.dsl.teksavvy.com [69.165.136.93]) by mx.google.com with ESMTPS id r38sm5499661qcs.26.2010.09.26.13.24.24 (version=SSLv3 cipher=RC4-MD5); Sun, 26 Sep 2010 13:24:25 -0700 (PDT) From: Arnaud Lacombe To: Michal Marek Cc: linux-kbuild , Arnaud Lacombe , Catalin Marinas Subject: [PATCH] kconfig: delay symbol direct dependency initialization Date: Sun, 26 Sep 2010 16:22:03 -0400 Message-Id: <1285532523-10180-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.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.3 (demeter1.kernel.org [140.211.167.41]); Sun, 26 Sep 2010 20:24:31 +0000 (UTC) diff --git a/scripts/kconfig/expr.h b/scripts/kconfig/expr.h index 2b95a58..2788c7a 100644 --- a/scripts/kconfig/expr.h +++ b/scripts/kconfig/expr.h @@ -165,7 +165,6 @@ struct menu { struct symbol *sym; struct property *prompt; struct expr *dep; - struct expr *dir_dep; unsigned int flags; char *help; struct file *file; diff --git a/scripts/kconfig/menu.c b/scripts/kconfig/menu.c index 4fb5902..edda8b4 100644 --- a/scripts/kconfig/menu.c +++ b/scripts/kconfig/menu.c @@ -107,7 +107,6 @@ static struct expr *menu_check_dep(struct expr *e) void menu_add_dep(struct expr *dep) { current_entry->dep = expr_alloc_and(current_entry->dep, menu_check_dep(dep)); - current_entry->dir_dep = current_entry->dep; } void menu_set_type(int type) @@ -291,10 +290,6 @@ void menu_finalize(struct menu *parent) for (menu = parent->list; menu; menu = menu->next) menu_finalize(menu); } else if (sym) { - /* ignore inherited dependencies for dir_dep */ - sym->dir_dep.expr = expr_transform(expr_copy(parent->dir_dep)); - sym->dir_dep.expr = expr_eliminate_dups(sym->dir_dep.expr); - basedep = parent->prompt ? parent->prompt->visible.expr : NULL; basedep = expr_trans_compare(basedep, E_UNEQUAL, &symbol_no); basedep = expr_eliminate_dups(expr_transform(basedep)); @@ -325,6 +320,8 @@ void menu_finalize(struct menu *parent) parent->next = last_menu->next; last_menu->next = NULL; } + + sym->dir_dep.expr = parent->dep; } for (menu = parent->list; menu; menu = menu->next) { if (sym && sym_is_choice(sym) &&