Re: [GIT] kbuild: kconfig changes

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Sam Ravnborg
Date: Wednesday, August 11, 2010 - 1:34 pm

> 
Fixed it - see patch below.

@Michal - I will do a proper patch submission if Arve
can confirm that the problem he saw has been fixed
with these patches.

	Sam

From d93f83bbd650499c146f29a8a4de2b1f98dfbefe Mon Sep 17 00:00:00 2001
From: Sam Ravnborg <sam@ravnborg.org>
Date: Wed, 11 Aug 2010 22:29:05 +0200
Subject: [PATCH] kconfig: fix savedefconfig for tristate choices

savedefconfig failed to save choice symbols equal to 'y'
for tristate choices.
This resulted in this value being lost.

In particular is fixes an issue where

make ARCH=avr32 atngw100_defconfig
make ARCH=avr32 savedefconfig
cp defconfig arch/avr32/configs/atngw100_defconfig
make ARCH=avr32 atngw100_defconfig
diff -u .config .config.old

failed to produce an identical .config.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
 scripts/kconfig/confdata.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index f81f263..e5d66e4 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -497,7 +497,7 @@ int conf_write_defconfig(const char *filename)
 			/*
 			 * If symbol is a choice value and equals to the
 			 * default for a choice - skip.
-			 * But only if value equal to "y".
+			 * But only if value is bool and equal to "y" .
 			 */
 			if (sym_is_choice_value(sym)) {
 				struct symbol *cs;
@@ -506,9 +506,8 @@ int conf_write_defconfig(const char *filename)
 				cs = prop_get_symbol(sym_get_choice_prop(sym));
 				ds = sym_choice_default(cs);
 				if (sym == ds) {
-					if ((sym->type == S_BOOLEAN ||
-					sym->type == S_TRISTATE) &&
-					sym_get_tristate_value(sym) == yes)
+					if ((sym->type == S_BOOLEAN) &&
+					    sym_get_tristate_value(sym) == yes)
 						goto next_menu;
 				}
 			}
-- 
1.6.0.6

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[GIT] kbuild: kconfig changes, Michal Marek, (Wed Aug 4, 5:51 am)
Re: [GIT] kbuild: kconfig changes, Linus Torvalds, (Thu Aug 5, 4:33 pm)
Re: [GIT] kbuild: kconfig changes, Justin P. Mattock, (Thu Aug 5, 6:27 pm)
Re: [GIT] kbuild: kconfig changes, Linus Torvalds, (Thu Aug 5, 7:08 pm)
Re: [GIT] kbuild: kconfig changes, Justin P. Mattock, (Thu Aug 5, 7:54 pm)
[PATCH] kconfig: fix make oldconfig, Sam Ravnborg, (Thu Aug 5, 10:13 pm)
Re: [PATCH] kconfig: fix make oldconfig, Justin P. Mattock, (Thu Aug 5, 11:02 pm)
Re: [PATCH] kconfig: fix make oldconfig, Michal Marek, (Fri Aug 6, 3:21 am)
Re: [PATCH] kconfig: fix make oldconfig, Linus Torvalds, (Fri Aug 6, 9:19 am)
Re: [PATCH] kconfig: fix make oldconfig, Sam Ravnborg, (Fri Aug 6, 10:52 am)
Re: [PATCH] kconfig: fix make oldconfig, Linus Torvalds, (Fri Aug 6, 11:09 am)
Re: [PATCH] kconfig: fix make oldconfig, Justin P. Mattock, (Fri Aug 6, 12:52 pm)
Re: [GIT] kbuild: kconfig changes, Arve Hjønnevåg, (Fri Aug 6, 4:19 pm)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Fri Aug 6, 9:01 pm)
Re: [GIT] kbuild: kconfig changes, Arve Hjønnevåg, (Fri Aug 6, 9:43 pm)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Sun Aug 8, 8:57 am)
Re: [GIT] kbuild: kconfig changes, Michal Marek, (Tue Aug 10, 7:04 am)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Tue Aug 10, 7:25 am)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Wed Aug 11, 12:51 pm)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Wed Aug 11, 1:34 pm)
Re: [GIT] kbuild: kconfig changes, Arve Hjønnevåg, (Wed Aug 11, 4:39 pm)
Re: [GIT] kbuild: kconfig changes, Sam Ravnborg, (Wed Aug 11, 8:45 pm)