public inbox for linux-kbuild@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] kconfig: make randconfig fair for booleans
@ 2010-07-22 12:24 Peter Korsgaard
  2010-07-23 21:11 ` Sam Ravnborg
  0 siblings, 1 reply; 5+ messages in thread
From: Peter Korsgaard @ 2010-07-22 12:24 UTC (permalink / raw)
  To: linux-kbuild, zippel, mmarek, sam; +Cc: Peter Korsgaard

Give boolean symbols a 50% chance of getting enabled, rather than 67%.

Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
---
 scripts/kconfig/confdata.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index c4dec80..210a49e 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -862,7 +862,8 @@ void conf_set_all_new_symbols(enum conf_def_mode mode)
 				sym->def[S_DEF_USER].tri = no;
 				break;
 			case def_random:
-				sym->def[S_DEF_USER].tri = (tristate)(rand() % 3);
+				cnt = sym_get_type(sym) == S_TRISTATE ? 3 : 2;
+				sym->def[S_DEF_USER].tri = (tristate)(rand() % cnt);
 				break;
 			default:
 				continue;
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: make randconfig fair for booleans
  2010-07-22 12:24 [PATCH] kconfig: make randconfig fair for booleans Peter Korsgaard
@ 2010-07-23 21:11 ` Sam Ravnborg
  2010-07-26  9:59   ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2010-07-23 21:11 UTC (permalink / raw)
  To: Peter Korsgaard, Michal Marek; +Cc: linux-kbuild, zippel

On Thu, Jul 22, 2010 at 02:24:57PM +0200, Peter Korsgaard wrote:
> Give boolean symbols a 50% chance of getting enabled, rather than 67%.
> 
> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>

Good catch!

Acked-by: Sam Ravnborg <sam@ravnborg.org>

Michal - I assume you apply this for next merge window.

	Sam

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: make randconfig fair for booleans
  2010-07-23 21:11 ` Sam Ravnborg
@ 2010-07-26  9:59   ` Michal Marek
  2010-07-26 13:52     ` Michal Marek
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Marek @ 2010-07-26  9:59 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Peter Korsgaard, linux-kbuild, zippel

On 23.7.2010 23:11, Sam Ravnborg wrote:
> On Thu, Jul 22, 2010 at 02:24:57PM +0200, Peter Korsgaard wrote:
>> Give boolean symbols a 50% chance of getting enabled, rather than 67%.
>>
>> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
> 
> Good catch!
> 
> Acked-by: Sam Ravnborg <sam@ravnborg.org>
> 
> Michal - I assume you apply this for next merge window.

Yes, will do. I've been busy (again :)) for the last two weeks, so only
reviewed the few patches for .35.

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: make randconfig fair for booleans
  2010-07-26  9:59   ` Michal Marek
@ 2010-07-26 13:52     ` Michal Marek
  2010-07-26 15:20       ` Randy Dunlap
  0 siblings, 1 reply; 5+ messages in thread
From: Michal Marek @ 2010-07-26 13:52 UTC (permalink / raw)
  To: Sam Ravnborg; +Cc: Peter Korsgaard, linux-kbuild, zippel, Randy Dunlap

On 26.7.2010 11:59, Michal Marek wrote:
> On 23.7.2010 23:11, Sam Ravnborg wrote:
>> On Thu, Jul 22, 2010 at 02:24:57PM +0200, Peter Korsgaard wrote:
>>> Give boolean symbols a 50% chance of getting enabled, rather than 67%.
>>>
>>> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
>>
>> Good catch!
>>
>> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>>
>> Michal - I assume you apply this for next merge window.
> 
> Yes, will do. I've been busy (again :)) for the last two weeks, so only
> reviewed the few patches for .35.

Applied now.

CCing Randy. FYI, you'll see a little less builds with CONFIG_MODULES=y
starting with tomorrow's linux-next. It should not matter unless you're
maintaining some statistics.

Michal

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] kconfig: make randconfig fair for booleans
  2010-07-26 13:52     ` Michal Marek
@ 2010-07-26 15:20       ` Randy Dunlap
  0 siblings, 0 replies; 5+ messages in thread
From: Randy Dunlap @ 2010-07-26 15:20 UTC (permalink / raw)
  To: Michal Marek; +Cc: Sam Ravnborg, Peter Korsgaard, linux-kbuild, zippel

On 07/26/10 06:52, Michal Marek wrote:
> On 26.7.2010 11:59, Michal Marek wrote:
>> On 23.7.2010 23:11, Sam Ravnborg wrote:
>>> On Thu, Jul 22, 2010 at 02:24:57PM +0200, Peter Korsgaard wrote:
>>>> Give boolean symbols a 50% chance of getting enabled, rather than 67%.
>>>>
>>>> Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
>>>
>>> Good catch!
>>>
>>> Acked-by: Sam Ravnborg <sam@ravnborg.org>
>>>
>>> Michal - I assume you apply this for next merge window.
>>
>> Yes, will do. I've been busy (again :)) for the last two weeks, so only
>> reviewed the few patches for .35.
> 
> Applied now.
> 
> CCing Randy. FYI, you'll see a little less builds with CONFIG_MODULES=y
> starting with tomorrow's linux-next. It should not matter unless you're
> maintaining some statistics.

Thanks.  Not a problem.  No stats.

-- 
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-07-26 15:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-22 12:24 [PATCH] kconfig: make randconfig fair for booleans Peter Korsgaard
2010-07-23 21:11 ` Sam Ravnborg
2010-07-26  9:59   ` Michal Marek
2010-07-26 13:52     ` Michal Marek
2010-07-26 15:20       ` Randy Dunlap

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox