lkml.org 
[lkml]   [2012]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: kconfig: tristate choice with depender choice
From
On Thu, 09 Feb 2012 23:30:17 +0900 (JST), Atsushi Nemoto <anemo@mba.ocn.ne.jp> wrote:
> I tested in this way:
>
> 1. Add this example to the end of drivers/char/Kconfig file.
> -------------------------------------
> choice
> prompt "choice list AB"
> config A
> tristate "a"
> config B
> tristate "b"
> endchoice
> choice
> prompt "choice list CD"
> depends on A
> config C
> bool "c"
> config D
> bool "d"
> endchoice
> -------------------------------------
>
> 2. Then run commands:
>
> $ cp arch/x86/configs/i386_defconfig arch/x86/configs/test_defconfig
> $ echo 'CONFIG_A=y' >> arch/x86/configs/test_defconfig
> $ make O=../build test_defconfig
> $ grep CONFIG_A= ../build/.config
> CONFIG_A=m

I did some investigations.
When this happens, sym_calc_value() was called recursively.

main
conf_set_all_new_symbols
sym_calc_value ("choice list CD")
sym_calc_visibility ("choice list CD")
expr_calc_value
sym_calc_value ("A")

On this place in sym_calc_value(), sym->def[S_DEF_USER].tri was 'yes'
and sym->visible was 'mod'.

newval.tri = EXPR_AND(sym->def[S_DEF_USER].tri,
sym->visible);
goto calc_newval;

Then new value of CONFIG_A will be 'mod'.

I suppose sym->visible is 'mod' because default value of tristate
choice is 'mod'. Is this correct?
Any suggestions for fixing or debugging?

---
Atsushi Nemoto


\
 
 \ /
  Last update: 2012-02-17 16:17    [W:0.036 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site