linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Zippel <zippel@linux-m68k.org>
To: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: "Oliver Neukum" <oneukum@suse.de>,
	linux-usb-devel@lists.sourceforge.net,
	video4linux-list@redhat.com,
	"Toralf F�rster" <toralf.foerster@gmx.de>,
	luca.risolia@studio.unibo.it,
	"Jan Engelhardt" <jengelh@linux01.gwdg.de>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: Kconfig troubles when using menuconfig - Was: [patch]Re: [linux-usb-devel] linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c
Date: Fri, 22 Jun 2007 18:31:43 +0200 (CEST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0706221825030.1817@scrub.home> (raw)
In-Reply-To: <1182525697.14289.47.camel@gaivota>

Hi,

On Fri, 22 Jun 2007, Mauro Carvalho Chehab wrote:

> I'm to keep "default y" for the menuconfig items. 
> 
> Since those don't generate any code (there's no Makefile items
> associated with the menuconfig vars),

I don't know that without checking Makefiles/sources, so I have to assume 
it may produce some infrastructure code I don't need.

> this will just improve the
> usability for the final user (and will allow make oldconfig to work).

I'd rather change that.

> There's not much sense on selecting V4L support without selecting a V4L
> driver.

But if only want to enable a video driver, I likely don't want a radio 
driver...

bye, Roman



Reset generates values only if Kconfig and .config agree.

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

---
 scripts/kconfig/confdata.c |   37 ++++++++++++++++++++++++++-----------
 1 file changed, 26 insertions(+), 11 deletions(-)

Index: linux-2.6/scripts/kconfig/confdata.c
===================================================================
--- linux-2.6.orig/scripts/kconfig/confdata.c
+++ linux-2.6/scripts/kconfig/confdata.c
@@ -341,27 +341,42 @@ int conf_read(const char *name)
 		conf_unsaved++;
 		/* maybe print value in verbose mode... */
 	sym_ok:
+		if (!sym_is_choice(sym))
+			continue;
+		/* The choice symbol only has a set value (and thus is not new)
+		 * if all its visible childs have values.
+		 */
+		prop = sym_get_choice_prop(sym);
+		flags = sym->flags;
+		for (e = prop->expr; e; e = e->left.expr)
+			if (e->right.sym->visible != no)
+				flags &= e->right.sym->flags;
+		sym->flags &= flags | ~SYMBOL_DEF_USER;
+	}
+
+	for_all_symbols(i, sym) {
 		if (sym_has_value(sym) && !sym_is_choice_value(sym)) {
-			if (sym->visible == no)
+			/* Reset values of generates values, so they'll appear
+			 * as new, if they should become visible, but that
+			 * doesn't quite work if the Kconfig and the saved
+			 * configuration disagrees.
+			 */
+			if (sym->visible == no && !conf_unsaved)
 				sym->flags &= ~SYMBOL_DEF_USER;
 			switch (sym->type) {
 			case S_STRING:
 			case S_INT:
 			case S_HEX:
-				if (!sym_string_within_range(sym, sym->def[S_DEF_USER].val))
-					sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+				/* Reset a string value if it's out of range */
+				if (sym_string_within_range(sym, sym->def[S_DEF_USER].val))
+					break;
+				sym->flags &= ~(SYMBOL_VALID|SYMBOL_DEF_USER);
+				conf_unsaved++;
+				break;
 			default:
 				break;
 			}
 		}
-		if (!sym_is_choice(sym))
-			continue;
-		prop = sym_get_choice_prop(sym);
-		flags = sym->flags;
-		for (e = prop->expr; e; e = e->left.expr)
-			if (e->right.sym->visible != no)
-				flags &= e->right.sym->flags;
-		sym->flags &= flags | ~SYMBOL_DEF_USER;
 	}
 
 	sym_add_change_count(conf_warnings || conf_unsaved);

  reply	other threads:[~2007-06-22 16:31 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200706211117.55908.toralf.foerster@gmx.de>
     [not found] ` <200706211231.53898.luca.risolia@studio.unibo.it>
     [not found]   ` <200706211326.45031.toralf.foerster@gmx.de>
     [not found]     ` <200706211350.14526.oneukum@suse.de>
2007-06-22 13:22       ` Kconfig troubles when using menuconfig - Was: [patch]Re: [linux-usb-devel] linux-2.6.22-rc5-gf1518a0 build #300 failed in zc0301_core.c Mauro Carvalho Chehab
2007-06-22 13:46         ` Andreas Herrmann
2007-06-22 13:51           ` Jan Engelhardt
2007-06-22 14:23             ` Andreas Herrmann
2007-06-22 15:03             ` Mauro Carvalho Chehab
2007-06-22 15:32               ` Andreas Herrmann
2007-06-22 15:45               ` Oliver Neukum
2007-06-22 14:27         ` Roman Zippel
2007-06-22 15:18           ` Jan Engelhardt
2007-06-22 16:24             ` Roman Zippel
2007-06-22 16:42               ` Jan Engelhardt
2007-06-22 20:17                 ` Satyam Sharma
2007-06-22 21:00                   ` Satyam Sharma
2007-06-22 15:21           ` Mauro Carvalho Chehab
2007-06-22 16:31             ` Roman Zippel [this message]
2007-06-22 20:20         ` Trent Piepho
2007-06-22 21:20           ` Satyam Sharma
2007-06-22 21:45             ` Roman Zippel
2007-06-22 22:01               ` Satyam Sharma
2007-06-22 22:21                 ` Roman Zippel
2007-06-22 22:33                   ` Satyam Sharma
2007-06-22 23:12                     ` Roman Zippel
2007-06-22 23:26                       ` Satyam Sharma
2007-06-22 23:39                         ` Roman Zippel
2007-06-22 23:49                           ` Satyam Sharma
2007-06-23  0:26                             ` Roman Zippel
2007-06-23  6:57                               ` Jan Engelhardt
2007-06-25  0:11                                 ` Roman Zippel
2007-06-22 22:11             ` Jan Engelhardt
2007-06-23 12:28               ` Kconfig troubles when using menuconfig - Was: [patch]Re: " Oleg Verych
2007-06-23 22:33             ` Kconfig troubles when using menuconfig - Was: [patch]Re: [linux-usb-devel] " Trent Piepho
2007-06-24  3:28               ` Satyam Sharma
2007-06-23  7:20           ` [patch] 2.6.22-rc Kconfig troubles when using menuconfig Jan Engelhardt
2007-06-23 22:26             ` Mauro Carvalho Chehab
2007-06-24  0:14               ` Trent Piepho

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.0706221825030.1817@scrub.home \
    --to=zippel@linux-m68k.org \
    --cc=jengelh@linux01.gwdg.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb-devel@lists.sourceforge.net \
    --cc=luca.risolia@studio.unibo.it \
    --cc=mchehab@infradead.org \
    --cc=oneukum@suse.de \
    --cc=toralf.foerster@gmx.de \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).