From patchwork Wed Jul 8 21:45:56 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Warren X-Patchwork-Id: 241071 List-Id: U-Boot discussion From: swarren at wwwdotorg.org (Stephen Warren) Date: Wed, 8 Jul 2020 15:45:56 -0600 Subject: [PATCH] fixdep: fix CONFIG_IS_ENABLED etc. handling Message-ID: <20200708214556.90235-1-swarren@wwwdotorg.org> From: Stephen Warren When fixdep detects CONFIG_IS_ENABLED and other similar macros, it must parse the macro parameter to determine which actual CONFIG_ option is being referenced. This involves moving a pointer forward through the entire CONFIG_ option "word". Currently, the code uses variable q to walk through the word, but doesn't actually initialize it to point at the parameter before doing so. Consequently, the walking process immediately fails since it sees the macro invocatoins's ( rather than the expected alpha-numeric characters in the macro parameter. Fix this by adding the missing initialization. Fixes: 67f2ee86ccbe ("kbuild: fixdep: Resync this with v4.17") Fixes: 7012865e961c ("gpio: fix test.py for gpio label lookup") Signed-off-by: Stephen Warren Reviewed-by: Simon Glass --- scripts/basic/fixdep.c | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 24be244d5e6a..958668df5546 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -266,6 +266,7 @@ static void parse_config_file(const char *p) (q - p == 9 && !memcmp(p, "IS_MODULE(", 10)) || (q - p == 3 && !memcmp(p, "VAL(", 4))) { p = q + 1; + q = p; while (isalnum(*q) || *q == '_') q++; r = q;