From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from co202.xi-lite.net ([149.6.83.202]:58562 "EHLO co202.xi-lite.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753296Ab1IFIwK (ORCPT ); Tue, 6 Sep 2011 04:52:10 -0400 Message-ID: <4E65DF36.6040507@parrot.com> Date: Tue, 6 Sep 2011 10:52:06 +0200 From: Matthieu CASTET MIME-Version: 1.0 Subject: randconfig broken on choice Content-Type: multipart/mixed; boundary="------------050900080100090908010409" Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: "linux-kernel@vger.kernel.org" , linux-kbuild@vger.kernel.org --------------050900080100090908010409 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Hi, I am using v3.1-rc4 and make randconfig look broken for choice. The choice config is always the same or choice entry can have more than one entry. After some debugging, it seems in randomize_choice_values, we don't clean SYMBOL_VALID for choice entry. And we don't take "sym->def[S_DEF_USER].tri" but the "default sym->cur.tri". The following patch seems to fix the problem. Matthieu --------------050900080100090908010409 Content-Type: text/x-diff; name="randconfig.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="randconfig.diff" diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 59b667c..08331f8 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -1045,6 +1045,10 @@ static void randomize_choice_values(struct symbol *csym) else { sym->def[S_DEF_USER].tri = no; } + sym->flags |= SYMBOL_DEF_USER; + /* clear VALID to get value calculated */ + sym->flags &= ~(SYMBOL_VALID); + } csym->flags |= SYMBOL_DEF_USER; /* clear VALID to get value calculated */ --------------050900080100090908010409--