Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild

Pull kconfig bits from Michal Marek:
"There is one fix for make oldconfig by Arnaud and updates to the
merge_config.sh tool."

* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
merge_config.sh: Add option to display redundant configs
merge_config.sh: Set execute bit
merge_config.sh: Use the first file as the initial config
kconfig: fix new choices being skipped upon config update

+28 -22
+6 -20
scripts/kconfig/confdata.c
··· 344 344 345 345 int conf_read(const char *name) 346 346 { 347 - struct symbol *sym, *choice_sym; 348 - struct property *prop; 349 - struct expr *e; 350 - int i, flags; 347 + struct symbol *sym; 348 + int i; 351 349 352 350 sym_set_change_count(0); 353 351 ··· 355 357 for_all_symbols(i, sym) { 356 358 sym_calc_value(sym); 357 359 if (sym_is_choice(sym) || (sym->flags & SYMBOL_AUTO)) 358 - goto sym_ok; 360 + continue; 359 361 if (sym_has_value(sym) && (sym->flags & SYMBOL_WRITE)) { 360 362 /* check that calculated value agrees with saved value */ 361 363 switch (sym->type) { ··· 364 366 if (sym->def[S_DEF_USER].tri != sym_get_tristate_value(sym)) 365 367 break; 366 368 if (!sym_is_choice(sym)) 367 - goto sym_ok; 369 + continue; 368 370 /* fall through */ 369 371 default: 370 372 if (!strcmp(sym->curr.val, sym->def[S_DEF_USER].val)) 371 - goto sym_ok; 373 + continue; 372 374 break; 373 375 } 374 376 } else if (!sym_has_value(sym) && !(sym->flags & SYMBOL_WRITE)) 375 377 /* no previous value and not saved */ 376 - goto sym_ok; 378 + continue; 377 379 conf_unsaved++; 378 380 /* maybe print value in verbose mode... */ 379 - sym_ok: 380 - if (!sym_is_choice(sym)) 381 - continue; 382 - /* The choice symbol only has a set value (and thus is not new) 383 - * if all its visible childs have values. 384 - */ 385 - prop = sym_get_choice_prop(sym); 386 - flags = sym->flags; 387 - expr_list_for_each_sym(prop->expr, e, choice_sym) 388 - if (choice_sym->visible != no) 389 - flags &= choice_sym->flags; 390 - sym->flags &= flags | ~SYMBOL_DEF_USER; 391 381 } 392 382 393 383 for_all_symbols(i, sym) {
+14 -1
scripts/kconfig/merge_config.sh
··· 31 31 echo " -h display this help text" 32 32 echo " -m only merge the fragments, do not execute the make command" 33 33 echo " -n use allnoconfig instead of alldefconfig" 34 + echo " -r list redundant entries when merging fragments" 34 35 } 35 36 36 37 MAKE=true 37 38 ALLTARGET=alldefconfig 39 + WARNREDUN=false 38 40 39 41 while true; do 40 42 case $1 in ··· 54 52 usage 55 53 exit 56 54 ;; 55 + "-r") 56 + WARNREDUN=true 57 + shift 58 + continue 59 + ;; 57 60 *) 58 61 break 59 62 ;; 60 63 esac 61 64 done 62 65 63 - 66 + INITFILE=$1 67 + shift; 64 68 65 69 MERGE_LIST=$* 66 70 SED_CONFIG_EXP="s/^\(# \)\{0,1\}\(CONFIG_[a-zA-Z0-9_]*\)[= ].*/\2/p" 67 71 TMP_FILE=$(mktemp ./.tmp.config.XXXXXXXXXX) 72 + 73 + echo "Using $INITFILE as base" 74 + cat $INITFILE > $TMP_FILE 68 75 69 76 # Merge files, printing warnings on overrided values 70 77 for MERGE_FILE in $MERGE_LIST ; do ··· 90 79 echo Previous value: $PREV_VAL 91 80 echo New value: $NEW_VAL 92 81 echo 82 + elif [ "$WARNREDUN" = "true" ]; then 83 + echo Value of $CFG is redundant by fragment $MERGE_FILE: 93 84 fi 94 85 sed -i "/$CFG[ =]/d" $TMP_FILE 95 86 fi
+8 -1
scripts/kconfig/symbol.c
··· 262 262 struct symbol *def_sym; 263 263 struct property *prop; 264 264 struct expr *e; 265 + int flags; 265 266 266 267 /* first calculate all choice values' visibilities */ 268 + flags = sym->flags; 267 269 prop = sym_get_choice_prop(sym); 268 - expr_list_for_each_sym(prop->expr, e, def_sym) 270 + expr_list_for_each_sym(prop->expr, e, def_sym) { 269 271 sym_calc_visibility(def_sym); 272 + if (def_sym->visible != no) 273 + flags &= def_sym->flags; 274 + } 275 + 276 + sym->flags &= flags | ~SYMBOL_DEF_USER; 270 277 271 278 /* is the user choice visible? */ 272 279 def_sym = sym->def[S_DEF_USER].val;