LKML Archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple()
@ 2018-11-30  9:15 Masahiro Yamada
  2018-11-30  9:15 ` [PATCH 2/5] kconfig: rename conf_split_config() to conf_touch_deps() Masahiro Yamada
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Masahiro Yamada @ 2018-11-30  9:15 UTC (permalink / raw
  To: linux-kbuild; +Cc: Sam Ravnborg, Ulf Magnusson, Masahiro Yamada, linux-kernel

The two 'goto setsym' statements are reachable only when sym == NULL.

The code below the 'setsym:' label does nothing when sym == NULL
since there is just one if-block guarded by 'if (sym && ...)'.

Hence, 'goto setsym' can be replaced with 'continue'.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/kconfig/confdata.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index 91d0a5c..1e35529 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -363,7 +363,7 @@ int conf_read_simple(const char *name, int def)
 				sym = sym_find(line + 2 + strlen(CONFIG_));
 				if (!sym) {
 					sym_add_change_count(1);
-					goto setsym;
+					continue;
 				}
 			} else {
 				sym = sym_lookup(line + 2 + strlen(CONFIG_), 0);
@@ -397,7 +397,7 @@ int conf_read_simple(const char *name, int def)
 				sym = sym_find(line + strlen(CONFIG_));
 				if (!sym) {
 					sym_add_change_count(1);
-					goto setsym;
+					continue;
 				}
 			} else {
 				sym = sym_lookup(line + strlen(CONFIG_), 0);
@@ -416,7 +416,7 @@ int conf_read_simple(const char *name, int def)
 
 			continue;
 		}
-setsym:
+
 		if (sym && sym_is_choice_value(sym)) {
 			struct symbol *cs = prop_get_symbol(sym_get_choice_prop(sym));
 			switch (sym->def[def].tri) {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-12-08  6:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-30  9:15 [PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple() Masahiro Yamada
2018-11-30  9:15 ` [PATCH 2/5] kconfig: rename conf_split_config() to conf_touch_deps() Masahiro Yamada
2018-11-30  9:15 ` [PATCH 3/5] kconfig: split out code touching a file to conf_touch_dep() Masahiro Yamada
2018-11-30  9:15 ` [PATCH 4/5] kconfig: remove S_OTHER symbol type and correct dependency tracking Masahiro Yamada
2018-11-30  9:15 ` [PATCH 5/5] kconfig: remove k_invalid from expr_parse_string() return type Masahiro Yamada
2018-12-08  6:55 ` [PATCH 1/5] kconfig: remove unneeded setsym label in conf_read_simple() Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).