diff mbox

[PATCHv2] kconfig: simplify select-with-unmet-direct-dependency warning

Message ID 1291664152-795-1-git-send-email-lacombar@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arnaud Lacombe Dec. 6, 2010, 7:35 p.m. UTC
None
diff mbox

Patch

diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index 5297dbf..ec7cd39 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -629,9 +629,20 @@  int main(int ac, char **av)
 	case alldefconfig:
 		conf_set_all_new_symbols(def_default);
 		break;
-	case randconfig:
-		conf_set_all_new_symbols(def_random);
+	case randconfig: {
+		struct symbol *sym;
+		int i, j;
+		for (i = 0; i < 1024; i++) {
+			conf_set_all_new_symbols(def_random);
+			for_all_symbols(j, sym) {
+				sym_calc_value(sym);
+			}
+			sym_clear_all_valid();
+			sym_clear_all_value();
+		}
+		exit(0);
 		break;
+	}
 	case defconfig:
 		conf_set_all_new_symbols(def_default);
 		break;
diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c
index 0c28a79..1284444 100644
--- a/scripts/kconfig/symbol.c
+++ b/scripts/kconfig/symbol.c
@@ -433,6 +433,15 @@  void sym_clear_all_valid(void)
 		sym_calc_value(modules_sym);
 }
 
+void sym_clear_all_value(void)
+{
+	struct symbol *sym;
+	int i;
+
+	for_all_symbols(i, sym)
+		sym->flags &= ~SYMBOL_DEF_USER;
+}
+
 void sym_set_changed(struct symbol *sym)
 {
 	struct property *prop;