summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 14:32:34 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2017-09-08 14:32:34 -0700
commit3aea311c1b4002bd730a09530f80f2f2ad3bf495 (patch)
treea979c9d7dcc4d7f75f6417e437277b89424f3fc8 /scripts
parent015a9e66b9b8c1f28097ed09bf9350708e26249a (diff)
downloadlinux-0-day-3aea311c1b4002bd730a09530f80f2f2ad3bf495.tar.gz
linux-0-day-3aea311c1b4002bd730a09530f80f2f2ad3bf495.tar.xz
genksyms: fix gperf removal conversion
I had stupidly missed one special use of 'is_reserved_word()' when I converted the code to avoid gperf. I had changed that function to return the token ID directly rather than a pointer to the token descriptor structure, but that meant that the test for "is this a reserved word" changed from checking the return value against NULL, to checking that it wasn't negative. And while I had converted the main token parser over, I missed the special case of the typeof phrase handling. And since our dependency chain for genksyms does not include the genksyms program itself changing, my kernel rebuild didn't show the problem. Fixes: bb3290d91695 ("Remove gperf usage from toolchain") Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genksyms/lex.l2
-rw-r--r--scripts/genksyms/lex.lex.c_shipped2
2 files changed, 2 insertions, 2 deletions
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l
index 5dc25ee01c77b..d29c774f51b61 100644
--- a/scripts/genksyms/lex.l
+++ b/scripts/genksyms/lex.l
@@ -292,7 +292,7 @@ repeat:
case ST_TYPEOF_1:
if (token == IDENT)
{
- if (is_reserved_word(yytext, yyleng)
+ if (is_reserved_word(yytext, yyleng) >= 0
|| find_symbol(yytext, SYM_TYPEDEF, 1))
{
yyless(0);
diff --git a/scripts/genksyms/lex.lex.c_shipped b/scripts/genksyms/lex.lex.c_shipped
index d5a7474b3e57e..ba2fda8dfdb2c 100644
--- a/scripts/genksyms/lex.lex.c_shipped
+++ b/scripts/genksyms/lex.lex.c_shipped
@@ -2101,7 +2101,7 @@ repeat:
case ST_TYPEOF_1:
if (token == IDENT)
{
- if (is_reserved_word(yytext, yyleng)
+ if (is_reserved_word(yytext, yyleng) >= 0
|| find_symbol(yytext, SYM_TYPEDEF, 1))
{
yyless(0);