From patchwork Mon Dec 6 19:35:52 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Lacombe X-Patchwork-Id: 379682 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 oB6Jb0Bs020639 for ; Mon, 6 Dec 2010 19:37:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753730Ab0LFThA (ORCPT ); Mon, 6 Dec 2010 14:37:00 -0500 Received: from mail-vw0-f46.google.com ([209.85.212.46]:34894 "EHLO mail-vw0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752015Ab0LFTg7 (ORCPT ); Mon, 6 Dec 2010 14:36:59 -0500 Received: by vws16 with SMTP id 16so2859101vws.19 for ; Mon, 06 Dec 2010 11:36:58 -0800 (PST) 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:in-reply-to:references; bh=ClPJEKMC7kpXHJo4jivdA5R1CpzLQvrSq73qv7JWRVw=; b=s7UQSnn5CzCA+xglY2+sHHPVNz+9mfUdTxH/PQfxEAfL4phV6+1jlvKif4g9eGdwHk 1NxR7bKc2l95A+4kblzPNGajvZF3o5TO8Rb7Mb4d7duvsdWwjv4vXMb+lz39r1Vh9gDB b5wkBVWBKZtwnP+rAJ1WQSpKB5ja2DoLU2HOU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=gSkYZ7d1CQeUeuXvTczoVvAXTHQFQi/g+NKXx7II6QalIoNuiyEfPnIkKIYuSHhh99 otnOVqguRiGfyvOgJStswBhWfhQSiyXf7J5cugfQWFjSxp5XVsQQ1lSr/WpbpgXnPK5V g8s+1lBTTmp0+9OsVB12Wsho6xjwbn3UqnJ7k= Received: by 10.220.182.195 with SMTP id cd3mr891497vcb.3.1291664218248; Mon, 06 Dec 2010 11:36:58 -0800 (PST) Received: from localhost.localdomain (69-196-129-64.dsl.teksavvy.com [69.196.129.64]) by mx.google.com with ESMTPS id l5sm608559vcr.14.2010.12.06.11.36.56 (version=SSLv3 cipher=RC4-MD5); Mon, 06 Dec 2010 11:36:57 -0800 (PST) From: Arnaud Lacombe To: linux-kbuild@vger.kernel.org Cc: Arnaud Lacombe , Catalin Marinas Subject: Re: [PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning Date: Mon, 6 Dec 2010 14:35:52 -0500 Message-Id: <1291664152-795-1-git-send-email-lacombar@gmail.com> X-Mailer: git-send-email 1.7.2.30.gc37d7.dirty In-Reply-To: <1291663669-13077-1-git-send-email-lacombar@gmail.com> References: <1291663669-13077-1-git-send-email-lacombar@gmail.com> 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]); Mon, 06 Dec 2010 19:37:01 +0000 (UTC) diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c index 5297dbf..ec7cd39 100644 --- a/scripts/kconfig/conf.c +++ b/scripts/kconfig/conf.c @@ -629,9 +629,20 @@ int main(int ac, char **av) case alldefconfig: conf_set_all_new_symbols(def_default); break; - case randconfig: - conf_set_all_new_symbols(def_random); + case randconfig: { + struct symbol *sym; + int i, j; + for (i = 0; i < 1024; i++) { + conf_set_all_new_symbols(def_random); + for_all_symbols(j, sym) { + sym_calc_value(sym); + } + sym_clear_all_valid(); + sym_clear_all_value(); + } + exit(0); break; + } case defconfig: conf_set_all_new_symbols(def_default); break; diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 0c28a79..1284444 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -433,6 +433,15 @@ void sym_clear_all_valid(void) sym_calc_value(modules_sym); } +void sym_clear_all_value(void) +{ + struct symbol *sym; + int i; + + for_all_symbols(i, sym) + sym->flags &= ~SYMBOL_DEF_USER; +} + void sym_set_changed(struct symbol *sym) { struct property *prop;