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 <lacombar@gmail.com> [mmarek: Fix unused variable warning in conf_write()] Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
6e71fabe9e
commit
0dce631092
1 changed files with 5 additions and 13 deletions
|
@ -440,12 +440,11 @@ static void conf_write_string(bool headerfile, const char *name,
|
||||||
fputs("\"\n", out);
|
fputs("\"\n", out);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void conf_write_symbol(struct symbol *sym, enum symbol_type type,
|
static void conf_write_symbol(struct symbol *sym, FILE *out, bool write_no)
|
||||||
FILE *out, bool write_no)
|
|
||||||
{
|
{
|
||||||
const char *str;
|
const char *str;
|
||||||
|
|
||||||
switch (type) {
|
switch (sym->type) {
|
||||||
case S_BOOLEAN:
|
case S_BOOLEAN:
|
||||||
case S_TRISTATE:
|
case S_TRISTATE:
|
||||||
switch (sym_get_tristate_value(sym)) {
|
switch (sym_get_tristate_value(sym)) {
|
||||||
|
@ -532,7 +531,7 @@ int conf_write_defconfig(const char *filename)
|
||||||
goto next_menu;
|
goto next_menu;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
conf_write_symbol(sym, sym->type, out, true);
|
conf_write_symbol(sym, out, true);
|
||||||
}
|
}
|
||||||
next_menu:
|
next_menu:
|
||||||
if (menu->list != NULL) {
|
if (menu->list != NULL) {
|
||||||
|
@ -561,7 +560,6 @@ int conf_write(const char *name)
|
||||||
const char *basename;
|
const char *basename;
|
||||||
const char *str;
|
const char *str;
|
||||||
char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
|
char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
|
||||||
enum symbol_type type;
|
|
||||||
time_t now;
|
time_t now;
|
||||||
int use_timestamp = 1;
|
int use_timestamp = 1;
|
||||||
char *env;
|
char *env;
|
||||||
|
@ -633,14 +631,8 @@ int conf_write(const char *name)
|
||||||
if (!(sym->flags & SYMBOL_WRITE))
|
if (!(sym->flags & SYMBOL_WRITE))
|
||||||
goto next;
|
goto next;
|
||||||
sym->flags &= ~SYMBOL_WRITE;
|
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 */
|
/* Write config symbol to file */
|
||||||
conf_write_symbol(sym, type, out, true);
|
conf_write_symbol(sym, out, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
next:
|
next:
|
||||||
|
@ -842,7 +834,7 @@ int conf_write_autoconf(void)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
/* write symbol to config file */
|
/* write symbol to config file */
|
||||||
conf_write_symbol(sym, sym->type, out, false);
|
conf_write_symbol(sym, out, false);
|
||||||
|
|
||||||
/* update autoconf and tristate files */
|
/* update autoconf and tristate files */
|
||||||
switch (sym->type) {
|
switch (sym->type) {
|
||||||
|
|
Loading…
Reference in a new issue