Kconfig will print a warning when confronted with a negative "hex" value: 'number is invalid' Make this warning disappear for valid negative hexadecimals (ie, valid hexadecimal numbers that start with a minus sign, optionally followed by "0x"). Signed-off-by: Paul Bolle <pebolle@xxxxxxxxxx> --- I ran into this while trying some possible cleanups to various "hex" config entries, for which I needed to add a negative default. Currently there are no "hex" config entries with a negative default. (I don't know whether this warning can be triggered any other way.) This also allows to enter negative values for "hex" config entries. Apparently that's currently not needed. But these will then show up as (eg) "0x-ff" in the GUI. Should that be fixed in a separate commit or should I update this patch? scripts/kconfig/symbol.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/scripts/kconfig/symbol.c b/scripts/kconfig/symbol.c index 071f00c..2b33478 100644 --- a/scripts/kconfig/symbol.c +++ b/scripts/kconfig/symbol.c @@ -551,6 +551,8 @@ bool sym_string_valid(struct symbol *sym, const char *str) } return true; case S_HEX: + if (str[0] == '-') + str++; if (str[0] == '0' && (str[1] == 'x' || str[1] == 'X')) str += 2; ch = *str++; -- 1.7.4.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html