linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/9] kconfig: fix restart for choice symbols
@ 2005-11-03 15:06 Roman Zippel
  2005-11-05  6:05 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Zippel @ 2005-11-03 15:06 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel


The restart check whether new symbols became visible, didn't always work 
for choice symbols.

Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---

 scripts/kconfig/conf.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Index: linux-2.6/scripts/kconfig/conf.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/conf.c	2005-11-03 13:19:34.000000000 +0100
+++ linux-2.6/scripts/kconfig/conf.c	2005-11-03 13:22:59.000000000 +0100
@@ -468,7 +468,8 @@ static void check_conf(struct menu *menu
 
 	sym = menu->sym;
 	if (sym) {
-		if (sym_is_changable(sym) && !sym_has_value(sym)) {
+		if ((sym_is_changable(sym) || sym_is_choice(sym)) &&
+		    !sym_has_value(sym)) {
 			if (!conf_cnt++)
 				printf(_("*\n* Restart config...\n*\n"));
 			rootEntry = menu_get_parent_menu(menu);

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/9] kconfig: fix restart for choice symbols
  2005-11-03 15:06 [PATCH 2/9] kconfig: fix restart for choice symbols Roman Zippel
@ 2005-11-05  6:05 ` Andrew Morton
  2005-11-07 11:53   ` Roman Zippel
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2005-11-05  6:05 UTC (permalink / raw)
  To: Roman Zippel; +Cc: linux-kernel

Roman Zippel <zippel@linux-m68k.org> wrote:
>
> 
> The restart check whether new symbols became visible, didn't always work 
> for choice symbols.
> 
> ...
> --- linux-2.6.orig/scripts/kconfig/conf.c	2005-11-03 13:19:34.000000000 +0100
> +++ linux-2.6/scripts/kconfig/conf.c	2005-11-03 13:22:59.000000000 +0100
> @@ -468,7 +468,8 @@ static void check_conf(struct menu *menu
>  
>  	sym = menu->sym;
>  	if (sym) {
> -		if (sym_is_changable(sym) && !sym_has_value(sym)) {
> +		if ((sym_is_changable(sym) || sym_is_choice(sym)) &&
> +		    !sym_has_value(sym)) {
>  			if (!conf_cnt++)
>  				printf(_("*\n* Restart config...\n*\n"));
>  			rootEntry = menu_get_parent_menu(menu);

This makes `make allmodconfig' go into an infinite loop.


USB Gadget Drivers
  Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
  Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
    RNDIS support (EXPERIMENTAL) (USB_ETH_RNDIS) [Y/n/?] y
  Gadget Filesystem (EXPERIMENTAL) (USB_GADGETFS) [M/n/?] m
  File-backed Storage Gadget (USB_FILE_STORAGE) [M/n/?] m
    File-backed Storage Gadget testing version (USB_FILE_STORAGE_TEST) [Y/n/?] y
  Serial Gadget (with CDC ACM support) (USB_G_SERIAL) [M/n/?] m
*
* Restart config...
*
*
* USB Gadget Support
*
Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
  Debugging information files (USB_GADGET_DEBUG_FILES) [Y/n/?] y
USB Peripheral Controller
> 1. NetChip 2280 (USB_GADGET_NET2280)
  2. Toshiba TC86C001 'Goku-S' (USB_GADGET_GOKU) (NEW)
  3. Dummy HCD (DEVELOPMENT) (USB_GADGET_DUMMY_HCD) (NEW)
choice[1-3?]: 1
USB Gadget Drivers
  Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
  Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
    RNDIS support (EXPERIMENTAL) (USB_ETH_RNDIS) [Y/n/?] y
  Gadget Filesystem (EXPERIMENTAL) (USB_GADGETFS) [M/n/?] m
  File-backed Storage Gadget (USB_FILE_STORAGE) [M/n/?] m
    File-backed Storage Gadget testing version (USB_FILE_STORAGE_TEST) [Y/n/?] y
  Serial Gadget (with CDC ACM support) (USB_G_SERIAL) [M/n/?] m
*
* Restart config...
*
*
* USB Gadget Support
*
Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
  Debugging information files (USB_GADGET_DEBUG_FILES) [Y/n/?] y
USB Peripheral Controller
> 1. NetChip 2280 (USB_GADGET_NET2280)
  2. Toshiba TC86C001 'Goku-S' (USB_GADGET_GOKU) (NEW)
  3. Dummy HCD (DEVELOPMENT) (USB_GADGET_DUMMY_HCD) (NEW)
choice[1-3?]: 1
USB Gadget Drivers
  Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
  Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
    RNDIS support (EXPERIMENTAL) (USB_ETH_RNDIS) [Y/n/?] y
  Gadget Filesystem (EXPERIMENTAL) (USB_GADGETFS) [M/n/?] m
  File-backed Storage Gadget (USB_FILE_STORAGE) [M/n/?] m
    File-backed Storage Gadget testing version (USB_FILE_STORAGE_TEST) [Y/n/?] y
  Serial Gadget (with CDC ACM support) (USB_G_SERIAL) [M/n/?] m
*
* Restart config...
*
*
* USB Gadget Support
*
Support for USB Gadgets (USB_GADGET) [M/n/y/?] m
  Debugging information files (USB_GADGET_DEBUG_FILES) [Y/n/?] y
USB Peripheral Controller
> 1. NetChip 2280 (USB_GADGET_NET2280)
  2. Toshiba TC86C001 'Goku-S' (USB_GADGET_GOKU) (NEW)
  3. Dummy HCD (DEVELOPMENT) (USB_GADGET_DUMMY_HCD) (NEW)
choice[1-3?]: 1
USB Gadget Drivers
  Gadget Zero (DEVELOPMENT) (USB_ZERO) [M/n/?] m
  Ethernet Gadget (with CDC Ethernet support) (USB_ETH) [M/n/?] m
    RNDIS support (EXPERIMENTAL) (USB_ETH_RNDIS) [Y/n/?] y
  Gadget Filesystem (EXPERIMENTAL) (USB_GADGETFS) [M/n/?] m
  File-backed Storage Gadget (USB_FILE_STORAGE) [M/n/?] m
    File-backed Storage Gadget testing version (USB_FILE_STORAGE_TEST) [Y/n/?] y
  Serial Gadget (with CDC ACM support) (USB_G_SERIAL) [M/n/?] m

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 2/9] kconfig: fix restart for choice symbols
  2005-11-05  6:05 ` Andrew Morton
@ 2005-11-07 11:53   ` Roman Zippel
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Zippel @ 2005-11-07 11:53 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel

Hi,

On Fri, 4 Nov 2005, Andrew Morton wrote:

> This makes `make allmodconfig' go into an infinite loop.

Sorry, about that, here is an updated version.

bye, Roman


The restart check whether new symbols became visible, didn't always
work for choice symbols. Even if a choice symbol itself isn't changable, 
the childs are. This also requires to update the new status of all choice 
values, once one of them is set.


Signed-off-by: Roman Zippel <zippel@linux-m68k.org>

---

 scripts/kconfig/Makefile |    7 +++++--
 scripts/kconfig/conf.c   |    7 +++----
 scripts/kconfig/symbol.c |   11 +++++++++++
 3 files changed, 19 insertions(+), 6 deletions(-)

Index: linux-2.6/scripts/kconfig/conf.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/conf.c	2005-11-05 13:38:55.000000000 +0100
+++ linux-2.6/scripts/kconfig/conf.c	2005-11-06 16:11:19.000000000 +0100
@@ -467,15 +467,14 @@ static void check_conf(struct menu *menu
 		return;
 
 	sym = menu->sym;
-	if (sym) {
-		if (sym_is_changable(sym) && !sym_has_value(sym)) {
+	if (sym && !sym_has_value(sym)) {
+		if (sym_is_changable(sym) ||
+		    (sym_is_choice(sym) && sym_get_tristate_value(sym) == yes)) {
 			if (!conf_cnt++)
 				printf(_("*\n* Restart config...\n*\n"));
 			rootEntry = menu_get_parent_menu(menu);
 			conf(rootEntry);
 		}
-		if (sym_is_choice(sym) && sym_get_tristate_value(sym) != mod)
-			return;
 	}
 
 	for (child = menu->list; child; child = child->next)
Index: linux-2.6/scripts/kconfig/symbol.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/symbol.c	2005-11-06 00:27:30.000000000 +0100
+++ linux-2.6/scripts/kconfig/symbol.c	2005-11-06 17:43:22.000000000 +0100
@@ -380,11 +380,22 @@ bool sym_set_tristate_value(struct symbo
 		sym->flags &= ~SYMBOL_NEW;
 		sym_set_changed(sym);
 	}
+	/*
+	 * setting a choice value also resets the new flag of the choice
+	 * symbol and all other choice values.
+	 */
 	if (sym_is_choice_value(sym) && val == yes) {
 		struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
+		struct property *prop;
+		struct expr *e;
 
 		cs->user.val = sym;
 		cs->flags &= ~SYMBOL_NEW;
+		prop = sym_get_choice_prop(cs);
+		for (e = prop->expr; e; e = e->left.expr) {
+			if (e->right.sym->visible != no)
+				e->right.sym->flags &= ~SYMBOL_NEW;
+		}
 	}
 
 	sym->user.tri = val;

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-11-07 11:53 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-03 15:06 [PATCH 2/9] kconfig: fix restart for choice symbols Roman Zippel
2005-11-05  6:05 ` Andrew Morton
2005-11-07 11:53   ` Roman Zippel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).