Merge tag 'kbuild-v6.10' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
[sfrench/cifs-2.6.git] / scripts / kconfig / nconf.c
index 9d22b0f3197b8740c29d10af7de341c7b1d1c14c..e1cb09418cbe78ec3418a4ee7a393cff836f2fb9 100644 (file)
@@ -826,26 +826,18 @@ static void build_conf(struct menu *menu)
 
                val = sym_get_tristate_value(sym);
                if (sym_is_changeable(sym)) {
-                       switch (type) {
-                       case S_BOOLEAN:
-                               item_make(menu, 't', "[%c]",
-                                               val == no ? ' ' : '*');
+                       switch (val) {
+                       case yes:
+                               ch = '*';
                                break;
-                       case S_TRISTATE:
-                               switch (val) {
-                               case yes:
-                                       ch = '*';
-                                       break;
-                               case mod:
-                                       ch = 'M';
-                                       break;
-                               default:
-                                       ch = ' ';
-                                       break;
-                               }
-                               item_make(menu, 't', "<%c>", ch);
+                       case mod:
+                               ch = 'M';
+                               break;
+                       default:
+                               ch = ' ';
                                break;
                        }
+                       item_make(menu, 't', "<%c>", ch);
                } else {
                        item_make(menu, def_menu ? 't' : ':', "   ");
                }
@@ -853,16 +845,8 @@ static void build_conf(struct menu *menu)
                item_add_str("%*c%s", indent + 1,
                                ' ', menu_get_prompt(menu));
                if (val == yes) {
-                       if (def_menu) {
-                               item_add_str(" (%s)",
-                                       menu_get_prompt(def_menu));
-                               item_add_str("  --->");
-                               if (def_menu->list) {
-                                       indent += 2;
-                                       build_conf(def_menu);
-                                       indent -= 2;
-                               }
-                       }
+                       if (def_menu)
+                               item_add_str(" (%s)  --->", menu_get_prompt(def_menu));
                        return;
                }
        } else {
@@ -874,54 +858,46 @@ static void build_conf(struct menu *menu)
                }
                child_count++;
                val = sym_get_tristate_value(sym);
-               if (sym_is_choice_value(sym) && val == yes) {
-                       item_make(menu, ':', "   ");
-               } else {
-                       switch (type) {
-                       case S_BOOLEAN:
-                               if (sym_is_changeable(sym))
-                                       item_make(menu, 't', "[%c]",
-                                               val == no ? ' ' : '*');
-                               else
-                                       item_make(menu, 't', "-%c-",
-                                               val == no ? ' ' : '*');
+               switch (type) {
+               case S_BOOLEAN:
+                       if (sym_is_changeable(sym))
+                               item_make(menu, 't', "[%c]",
+                                         val == no ? ' ' : '*');
+                       else
+                               item_make(menu, 't', "-%c-",
+                                         val == no ? ' ' : '*');
+                       break;
+               case S_TRISTATE:
+                       switch (val) {
+                       case yes:
+                               ch = '*';
                                break;
-                       case S_TRISTATE:
-                               switch (val) {
-                               case yes:
-                                       ch = '*';
-                                       break;
-                               case mod:
-                                       ch = 'M';
-                                       break;
-                               default:
-                                       ch = ' ';
-                                       break;
-                               }
-                               if (sym_is_changeable(sym)) {
-                                       if (sym->rev_dep.tri == mod)
-                                               item_make(menu,
-                                                       't', "{%c}", ch);
-                                       else
-                                               item_make(menu,
-                                                       't', "<%c>", ch);
-                               } else
-                                       item_make(menu, 't', "-%c-", ch);
+                       case mod:
+                               ch = 'M';
                                break;
                        default:
-                               tmp = 2 + strlen(sym_get_string_value(sym));
-                               item_make(menu, 's', "    (%s)",
-                                               sym_get_string_value(sym));
-                               tmp = indent - tmp + 4;
-                               if (tmp < 0)
-                                       tmp = 0;
-                               item_add_str("%*c%s%s", tmp, ' ',
-                                               menu_get_prompt(menu),
-                                               (sym_has_value(sym) ||
-                                                !sym_is_changeable(sym)) ? "" :
-                                               " (NEW)");
-                               goto conf_childs;
+                               ch = ' ';
+                               break;
                        }
+                       if (sym_is_changeable(sym)) {
+                               if (sym->rev_dep.tri == mod)
+                                       item_make(menu, 't', "{%c}", ch);
+                               else
+                                       item_make(menu, 't', "<%c>", ch);
+                       } else
+                               item_make(menu, 't', "-%c-", ch);
+                       break;
+               default:
+                       tmp = 2 + strlen(sym_get_string_value(sym));
+                       item_make(menu, 's', "    (%s)",
+                                 sym_get_string_value(sym));
+                       tmp = indent - tmp + 4;
+                       if (tmp < 0)
+                               tmp = 0;
+                       item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
+                                    (sym_has_value(sym) ||
+                                     !sym_is_changeable(sym)) ? "" : " (NEW)");
+                       goto conf_childs;
                }
                item_add_str("%*c%s%s", indent + 1, ' ',
                                menu_get_prompt(menu),