Merge branch 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jun 2013 01:05:45 +0000 (10:05 +0900)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 6 Jun 2013 01:05:45 +0000 (10:05 +0900)
Pull kbuild fixes from Michal Marek:
 "There is one fix for a kbuild regression, plus three kconfig fixes for
  bugs that have alway been there, but are simple enough to be fixed in
  an -rc"

* 'rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
  kconfig/menu.c: fix multiple references to expressions in menu_add_prop()
  mconf: handle keys in empty dialogs
  kbuild: Don't assume dts files live in arch/*/boot/dts
  scripts/config: fix assignment of parameters for short version of --*-after options

scripts/Makefile.lib
scripts/config
scripts/kconfig/lxdialog/menubox.c
scripts/kconfig/mconf.c
scripts/kconfig/menu.c

index 51bb3de680b67b78071ae7f9dcc03ae387c52b60..8337663aa298a0259d6c08ae93a7b7581d2691a5 100644 (file)
@@ -264,7 +264,7 @@ $(obj)/%.dtb.S: $(obj)/%.dtb
 quiet_cmd_dtc = DTC     $@
 cmd_dtc = $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
        $(objtree)/scripts/dtc/dtc -O dtb -o $@ -b 0 \
-               -i $(srctree)/arch/$(SRCARCH)/boot/dts $(DTC_FLAGS) \
+               -i $(dir $<) $(DTC_FLAGS) \
                -d $(depfile).dtc $(dtc-tmp) ; \
        cat $(depfile).pre $(depfile).dtc > $(depfile)
 
index bb4d3deb6d1c0add7815115a14a574212c0f3d90..a65ecbbdd32a90fbadf50aa9622ce555294cf350 100755 (executable)
@@ -105,7 +105,7 @@ while [ "$1" != "" ] ; do
                ;;
        --refresh)
                ;;
-       --*-after)
+       --*-after|-E|-D|-M)
                checkarg "$1"
                A=$ARG
                checkarg "$2"
index 48d382e7e3746bebd850114d4f7557dbc37c49db..38cd69c5660e5163bfc402617de0d702e3372bd6 100644 (file)
@@ -303,10 +303,11 @@ do_resize:
                                }
                }
 
-               if (i < max_choice ||
-                   key == KEY_UP || key == KEY_DOWN ||
-                   key == '-' || key == '+' ||
-                   key == KEY_PPAGE || key == KEY_NPAGE) {
+               if (item_count() != 0 &&
+                   (i < max_choice ||
+                    key == KEY_UP || key == KEY_DOWN ||
+                    key == '-' || key == '+' ||
+                    key == KEY_PPAGE || key == KEY_NPAGE)) {
                        /* Remove highligt of current item */
                        print_item(scroll + choice, choice, FALSE);
 
index 387dc8daf7b2d43ff96b735f6bd60b4c650f85a8..a69cbd78fb38e62f3f6c3978ef6a3935551aaabc 100644 (file)
@@ -670,11 +670,12 @@ static void conf(struct menu *menu, struct menu *active_menu)
                                  active_menu, &s_scroll);
                if (res == 1 || res == KEY_ESC || res == -ERRDISPLAYTOOSMALL)
                        break;
-               if (!item_activate_selected())
-                       continue;
-               if (!item_tag())
-                       continue;
-
+               if (item_count() != 0) {
+                       if (!item_activate_selected())
+                               continue;
+                       if (!item_tag())
+                               continue;
+               }
                submenu = item_data();
                active_menu = item_data();
                if (submenu)
index b5c7d90df9df801dac0ca12d64b609e686e74b62..fd3f0180e08fbafb537e128c9e46641288c68774 100644 (file)
@@ -146,11 +146,24 @@ struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *e
                        struct menu *menu = current_entry;
 
                        while ((menu = menu->parent) != NULL) {
+                               struct expr *dup_expr;
+
                                if (!menu->visibility)
                                        continue;
+                               /*
+                                * Do not add a reference to the
+                                * menu's visibility expression but
+                                * use a copy of it.  Otherwise the
+                                * expression reduction functions
+                                * will modify expressions that have
+                                * multiple references which can
+                                * cause unwanted side effects.
+                                */
+                               dup_expr = expr_copy(menu->visibility);
+
                                prop->visible.expr
                                        = expr_alloc_and(prop->visible.expr,
-                                                        menu->visibility);
+                                                        dup_expr);
                        }
                }