From 6e71fabe9e60b1c6db587fbeac349848647920ab Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Sun, 5 Dec 2010 01:31:57 -0500 Subject: kconfig: do not define AUTOCONF_INCLUDED AUTOCONF_INCLUDED is not checked is not used within the tree and its parent header, `autoconf.h', is safe to be re-included. Signed-off-by: Arnaud Lacombe Signed-off-by: Michal Marek --- scripts/kconfig/confdata.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index 9df8011..f349bdc 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -833,8 +833,7 @@ int conf_write_autoconf(void) " * Automatically generated C config: don't edit\n" " * %s\n" " * %s" - " */\n" - "#define AUTOCONF_INCLUDED\n", + " */\n", rootmenu.prompt->text, ctime(&now)); for_all_symbols(i, sym) { -- cgit v1.1 From 0dce631092f410bb22b21b3d47ef20d69389dfd9 Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Sun, 5 Dec 2010 01:33:16 -0500 Subject: kconfig: nuke second argument of conf_write_symbol() Replacing S_TRISTATE by S_BOOLEAN is a no-op for conf_write_symbol(). Signed-off-by: Arnaud Lacombe [mmarek: Fix unused variable warning in conf_write()] Signed-off-by: Michal Marek --- scripts/kconfig/confdata.c | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index f349bdc..d1bab0f 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -440,12 +440,11 @@ static void conf_write_string(bool headerfile, const char *name, fputs("\"\n", out); } -static void conf_write_symbol(struct symbol *sym, enum symbol_type type, - FILE *out, bool write_no) +static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no) { const char *str; - switch (type) { + switch (sym->type) { case S_BOOLEAN: case S_TRISTATE: switch (sym_get_tristate_value(sym)) { @@ -532,7 +531,7 @@ int conf_write_defconfig(const char *filename) goto next_menu; } } - conf_write_symbol(sym, sym->type, out, true); + conf_write_symbol(sym, out, true); } next_menu: if (menu->list != NULL) { @@ -561,7 +560,6 @@ int conf_write(const char *name) const char *basename; const char *str; char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1]; - enum symbol_type type; time_t now; int use_timestamp = 1; char *env; @@ -633,14 +631,8 @@ int conf_write(const char *name) if (!(sym->flags & SYMBOL_WRITE)) goto next; sym->flags &= ~SYMBOL_WRITE; - type = sym->type; - if (type == S_TRISTATE) { - sym_calc_value(modules_sym); - if (modules_sym->curr.tri == no) - type = S_BOOLEAN; - } /* Write config symbol to file */ - conf_write_symbol(sym, type, out, true); + conf_write_symbol(sym, out, true); } next: @@ -842,7 +834,7 @@ int conf_write_autoconf(void) continue; /* write symbol to config file */ - conf_write_symbol(sym, sym->type, out, false); + conf_write_symbol(sym, out, false); /* update autoconf and tristate files */ switch (sym->type) { -- cgit v1.1 From 579fb8e741fecef7dfd64afcc7b0b0c68ea207cc Mon Sep 17 00:00:00 2001 From: Arnaud Lacombe Date: Sun, 5 Dec 2010 01:41:16 -0500 Subject: kconfig: fix typos Signed-off-by: Arnaud Lacombe Signed-off-by: Michal Marek --- scripts/kconfig/confdata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/kconfig/confdata.c') diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c index d1bab0f..61c35bf 100644 --- a/scripts/kconfig/confdata.c +++ b/scripts/kconfig/confdata.c @@ -937,7 +937,7 @@ static void randomize_choice_values(struct symbol *csym) int cnt, def; /* - * If choice is mod then we may have more items slected + * If choice is mod then we may have more items selected * and if no then no-one. * In both cases stop. */ @@ -1033,10 +1033,10 @@ void conf_set_all_new_symbols(enum conf_def_mode mode) /* * We have different type of choice blocks. - * If curr.tri equal to mod then we can select several + * If curr.tri equals to mod then we can select several * choice symbols in one block. * In this case we do nothing. - * If curr.tri equal yes then only one symbol can be + * If curr.tri equals yes then only one symbol can be * selected in a choice block and we set it to yes, * and the rest to no. */ -- cgit v1.1