Re: [GIT] kbuild: kconfig changes

Arve Hjønnevåg
2010-08-06T23:19:23Z

On Wed, Aug 4, 2010 at 5:51 AM, Michal Marek <mmarek@suse.cz> wrote:
> Hi Linus,
>
> this is the kconfig part of kbuild. We have four new *config targets:
> * oldnoconfig: set all new options to 'n'
> * listnewconfig: list all unset config options
> * alldefconfig: set all options to their defaults specified in Kconfig
>  files
> * savedefconfig: write a defconfig file with only the differences from
>  an alldefconfig (aka minimal defconfig)
>
> Kconfig also warns when a select statement selects a symbol with unmet
> dependencies (which typically results in a broken config). Li Zefan did
> quite some usability fixes to the visual config interfaces.
>
> Michal
>
> The following changes since commit 9fe6206f400646a2322096b56c59891d530e8d51:
>
>  Linux 2.6.35 (2010-08-01 15:11:14 -0700)
>
> are available in the git repository at:
>  git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6.git kconfig
>
> Aristeu Rozanski (1):
>      kconfig: introduce nonint_oldconfig and loose_nonint_oldconfig
>
> Catalin Marinas (1):
>      kbuild: Warn on selecting symbols with unmet direct dependencies
>
> Jan Beulich (1):
>      kconfig: Don't write invisible choice values

This change prevents some the minimal defconfig options from working.
Specifically our usb gadget drivers do not get set. Reverting this
part of the changes fixes my problem, but I don't know what other side
effects it may have:

diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index e95718f..1797226 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -261,18 +261,14 @@ struct symbol *sym_choice_default(struct symbol *sym)
static struct symbol *sym_calc_choice(struct symbol *sym)
{
struct symbol *def_sym;
- struct property *prop;
- struct expr *e;
-
- /* first calculate all choice values' visibilities */
- prop = sym_get_choice_prop(sym);
- expr_list_for_each_sym(prop->expr, e, def_sym)
- sym_calc_visibility(def_sym);

/* is the user choice visible? */
def_sym = sym->def[S_DEF_USER].val;
- if (def_sym && def_sym->visible != no)
- return def_sym;
+ if (def_sym) {
+ sym_calc_visibility(def_sym);
+ if (def_sym->visible != no)
+ return def_sym;
+ }

def_sym = sym_choice_default(sym);

--
Arve Hjønnevåg