kconfig: make randconfig fair for booleans
PATCH 1/1 kconfig: make randconfig fair for booleans
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
--- scripts/kconfig/confdata.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
scripts/kconfig/confdata.c +2 -1
@@ -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 ;
Signature · 1 line
1.7.1
Quoted 3 lines · Peter Korsgaard
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
Signed-off-by Peter Korsgaard <[email protected]>
Good catch!
Michal - I assume you apply this for next merge window.
Sam
Quoted 10 lines · Sam Ravnborg
Quoted 3 lines · Peter Korsgaard
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
Signed-off-by Peter Korsgaard <[email protected]>Good catch!
Acked-by Sam Ravnborg <[email protected]>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
Quoted 6 lines · Michal Marek
Quoted 5 lines · Sam Ravnborg
Quoted 3 lines · Peter Korsgaard
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
Signed-off-by Peter Korsgaard <[email protected]>
Quoted 8 lines
Quoted 5 lines
Good catch!
Acked-by Sam Ravnborg <[email protected]>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
Quoted 13 lines · Michal Marek
Quoted 12 lines · Michal Marek
Quoted 10 lines · Sam Ravnborg
Quoted 3 lines · Peter Korsgaard
Give boolean symbols a 50% chance of getting enabled, rather than 67%.
Signed-off-by Peter Korsgaard <[email protected]>Good catch!
Acked-by Sam Ravnborg <[email protected]>Michal - I assume you apply this for next merge window.
Quoted 8 lines
Quoted 2 lines
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=ystarting with tomorrow's linux-next. It should not matter unless you're maintaining some statistics.
Thanks. Not a problem. No stats.
Signature · 2 lines
~Randy *** Remember to use Documentation/SubmitChecklist when testing your code ***