Thread (14 messages) 14 messages, 3 authors, 2021-02-22

[PATCH v2 1/3] kconfig: Remove duplicate call to sym_get_string_value()

STALE2050d LANDED

From: Mickaël Salaün <mic@digikod.net>
Date: 2021-02-15 18:15:47
Also in: linux-kbuild, lkml
Subsystem: kconfig, the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Revision v2 of 2 in this series; landed in mainline as f82bd80d37ec on 2021-02-24.

Revisions (2)
  1. v1 [diff vs current]
  2. v2 current
From: Mickaël Salaün <redacted>

Use the saved returned value of sym_get_string_value() instead of
calling it twice.

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Mickaël Salaün <redacted>
Link: https://lore.kernel.org/r/20210215181511.2840674-2-mic@digikod.net (local)
---
 scripts/kconfig/conf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/kconfig/conf.c b/scripts/kconfig/conf.c
index db03e2f45de4..18a233d27a8d 100644
--- a/scripts/kconfig/conf.c
+++ b/scripts/kconfig/conf.c
@@ -137,7 +137,7 @@ static int conf_string(struct menu *menu)
 		printf("%*s%s ", indent - 1, "", menu->prompt->text);
 		printf("(%s) ", sym->name);
 		def = sym_get_string_value(sym);
-		if (sym_get_string_value(sym))
+		if (def)
 			printf("[%s] ", def);
 		if (!conf_askvalue(sym, def))
 			return 0;
-- 
2.30.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help