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

[PATCH] kconfig: trivial cleanup

Replace all menu_add_prop mimicking menu_add_prompt with the latter func. I've
had to add a return value to menu_add_prompt for one usage.

I've rebuilt scripts/kconfig/zconf.tab.c_shipped by hand to reflect changes
in the source (I've not the same Bison version so regenerating it wouldn't
have been not a good idea), and compared it with what Roman itself did some
time ago, and it's the same.

So I guess this can be finally merged.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

authored by

blaisorblade@yahoo.it and committed by
Sam Ravnborg
fb7f6ff6 66d609ec

+11 -11
+1 -1
scripts/kconfig/lkc.h
··· 59 59 void menu_end_entry(void); 60 60 void menu_add_dep(struct expr *dep); 61 61 struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep); 62 - void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 62 + struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep); 63 63 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep); 64 64 void menu_add_symbol(enum prop_type type, struct symbol *sym, struct expr *dep); 65 65 void menu_finalize(struct menu *parent);
+2 -2
scripts/kconfig/menu.c
··· 136 136 return prop; 137 137 } 138 138 139 - void menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) 139 + struct property *menu_add_prompt(enum prop_type type, char *prompt, struct expr *dep) 140 140 { 141 - menu_add_prop(type, prompt, NULL, dep); 141 + return menu_add_prop(type, prompt, NULL, dep); 142 142 } 143 143 144 144 void menu_add_expr(enum prop_type type, struct expr *expr, struct expr *dep)
+4 -4
scripts/kconfig/zconf.tab.c_shipped
··· 1531 1531 1532 1532 { 1533 1533 menu_add_entry(NULL); 1534 - menu_add_prop(P_MENU, yyvsp[-1].string, NULL, NULL); 1534 + menu_add_prompt(P_MENU, yyvsp[-1].string, NULL); 1535 1535 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 1536 1536 ;} 1537 1537 break; ··· 1586 1586 1587 1587 { 1588 1588 menu_add_entry(NULL); 1589 - menu_add_prop(P_COMMENT, yyvsp[-1].string, NULL, NULL); 1589 + menu_add_prompt(P_COMMENT, yyvsp[-1].string, NULL); 1590 1590 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 1591 1591 ;} 1592 1592 break; ··· 1640 1640 case 86: 1641 1641 1642 1642 { 1643 - menu_add_prop(P_PROMPT, yyvsp[-1].string, NULL, yyvsp[0].expr); 1643 + menu_add_prompt(P_PROMPT, yyvsp[-1].string, yyvsp[0].expr); 1644 1644 ;} 1645 1645 break; 1646 1646 ··· 1925 1925 sym_init(); 1926 1926 menu_init(); 1927 1927 modules_sym = sym_lookup("MODULES", 0); 1928 - rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL); 1928 + rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 1929 1929 1930 1930 //zconfdebug = 1; 1931 1931 zconfparse();
+4 -4
scripts/kconfig/zconf.y
··· 342 342 menu: T_MENU prompt T_EOL 343 343 { 344 344 menu_add_entry(NULL); 345 - menu_add_prop(P_MENU, $2, NULL, NULL); 345 + menu_add_prompt(P_MENU, $2, NULL); 346 346 printd(DEBUG_PARSE, "%s:%d:menu\n", zconf_curname(), zconf_lineno()); 347 347 }; 348 348 ··· 392 392 comment: T_COMMENT prompt T_EOL 393 393 { 394 394 menu_add_entry(NULL); 395 - menu_add_prop(P_COMMENT, $2, NULL, NULL); 395 + menu_add_prompt(P_COMMENT, $2, NULL); 396 396 printd(DEBUG_PARSE, "%s:%d:comment\n", zconf_curname(), zconf_lineno()); 397 397 }; 398 398 ··· 443 443 /* empty */ 444 444 | prompt if_expr 445 445 { 446 - menu_add_prop(P_PROMPT, $1, NULL, $2); 446 + menu_add_prompt(P_PROMPT, $1, $2); 447 447 }; 448 448 449 449 prompt: T_WORD ··· 487 487 sym_init(); 488 488 menu_init(); 489 489 modules_sym = sym_lookup("MODULES", 0); 490 - rootmenu.prompt = menu_add_prop(P_MENU, "Linux Kernel Configuration", NULL, NULL); 490 + rootmenu.prompt = menu_add_prompt(P_MENU, "Linux Kernel Configuration", NULL); 491 491 492 492 //zconfdebug = 1; 493 493 zconfparse();