Skip to contentSkip to conversation

kconfig: adjust warning message for conflicting types

PATCH In review Martin Walch 2 participants 2 messages Oct 3, 2013 – Oct 4, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 3/5 kconfig: adjust warning message for conflicting types

From: Martin Walch <[email protected]>
Date: Thu, 3 Oct 2013 18:32:02 +0200
Subject: [PATCH v2 3/5] kconfig: adjust warning message for conflicting types

Each symbol must have exactly one type assigned. However, if a symbol happens to have two different types assigned at runtime, a warning is printed and the first type is preserved while the second type is being ignored.

The warning message says

type of <symbol name> redefined from <first type> to <second type>

which may be misleading as it may create the impression that the second type replaces the first type.

This patch clarifies this by changing the warning to

ignoring type redefinition of <symbol name> from <first type> to <second type>

---
 scripts/kconfig/menu.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
scripts/kconfig/menu.c +4 -3
index b970101..9e69f19 100644
@@ -119,9 +119,10 @@ void menu_set_type(int type)
 		sym->type = type;
 		return;
 	}
-	menu_warn(current_entry, "type of '%s' redefined from '%s' to '%s'",
-	    sym->name ? sym->name : "<choice>",
-	    sym_type_name(sym->type), sym_type_name(type));
+	menu_warn(current_entry,
+		"ignoring type redefinition of '%s' from '%s' to '%s'",
+		sym->name ? sym->name : "<choice>",
+		sym_type_name(sym->type), sym_type_name(type));
 }
 
 struct property *menu_add_prop(enum prop_type type, char *prompt, struct expr *expr, struct expr *dep)
Signature · 1 line
1.8.1.5
Acked-by on v2 3/5
#1 lore raw
Quoted 12 lines · Martin Walch

From: Martin Walch <[email protected]>
Date: Thu, 3 Oct 2013 18:32:02 +0200
Subject: [PATCH v2 3/5] kconfig: adjust warning message for conflicting types

Each symbol must have exactly one type assigned. However, if a symbol happens to have two different types assigned at runtime, a warning is printed and the first type is preserved while the second type is being ignored.

The warning message says

type of <symbol name> redefined from <first type> to <second type>

Quoted 8 lines

which may be misleading as it may create the impression that the second type replaces the first type.

This patch clarifies this by changing the warning to

ignoring type redefinition of <symbol name> from <first type> to <second type>