Skip to content

Commit

Permalink
fixdep: fix CONFIG_IS_ENABLED etc. handling
Browse files Browse the repository at this point in the history
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: 67f2ee8 ("kbuild: fixdep: Resync this with v4.17")
Fixes: 7012865 ("gpio: fix test.py for gpio label lookup")
Signed-off-by: Stephen Warren <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
  • Loading branch information
nvswarren authored and trini committed Jul 17, 2020
1 parent dd85dc5 commit 76ae74d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scripts/basic/fixdep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 76ae74d

Please sign in to comment.