mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
kconfig: Delete unnecessary checks before the function call "sym_calc_value"
The sym_calc_value() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Michal Marek <mmarek@suse.com>
This commit is contained in:
parent
d770e558e2
commit
35ffd08d9b
2 changed files with 3 additions and 7 deletions
|
@ -268,8 +268,7 @@ int conf_read_simple(const char *name, int def)
|
||||||
goto load;
|
goto load;
|
||||||
sym_add_change_count(1);
|
sym_add_change_count(1);
|
||||||
if (!sym_defconfig_list) {
|
if (!sym_defconfig_list) {
|
||||||
if (modules_sym)
|
sym_calc_value(modules_sym);
|
||||||
sym_calc_value(modules_sym);
|
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -404,9 +403,7 @@ setsym:
|
||||||
}
|
}
|
||||||
free(line);
|
free(line);
|
||||||
fclose(in);
|
fclose(in);
|
||||||
|
sym_calc_value(modules_sym);
|
||||||
if (modules_sym)
|
|
||||||
sym_calc_value(modules_sym);
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -467,8 +467,7 @@ void sym_clear_all_valid(void)
|
||||||
for_all_symbols(i, sym)
|
for_all_symbols(i, sym)
|
||||||
sym->flags &= ~SYMBOL_VALID;
|
sym->flags &= ~SYMBOL_VALID;
|
||||||
sym_add_change_count(1);
|
sym_add_change_count(1);
|
||||||
if (modules_sym)
|
sym_calc_value(modules_sym);
|
||||||
sym_calc_value(modules_sym);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool sym_tristate_within_range(struct symbol *sym, tristate val)
|
bool sym_tristate_within_range(struct symbol *sym, tristate val)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue