diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 21:39:15 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-09-07 21:39:15 -0700 |
commit | 5969d1bb3082b41eba8fd2c826559abe38ccb6df (patch) | |
tree | 39f72fe44d2842ee29e89b0d23c61569fa7f725c /scripts/genksyms/lex.l | |
parent | 572c01ba19ef150e98aea0b45ca17d43356521b5 (diff) | |
parent | bb3290d91695bb1ae78ab86f18fb4d7ad8e5ebcc (diff) |
Merge branch 'gperf-removal'
Remove our use of 'gperf' for generating perfect hashes from some of our
build tools.
This removal was prompted by Masahiro Yamada sending out a patch that
removes all our pre-generated files, and when I tested it, I noticed
that the gperf version I have (3.1) apparently generates code that no
longer works with out code-base because the function interfaces
generated by gperf have changed.
We really don't care that much, and the gperf people changed their
interfaces in ways that makes it annoying to work with them. Tools that
make it hard to use them should not be used, and the kernel is not at
all interested in some autoconf mess. So remove the gperf dependency
entirely.
It turns out that if you ignore the pre-generated files, the use of
gperf apparently saved us a whopping fifteen lines of code. It
obviously wasn't worth it, considering that the pre-generated files are
about 500 lines.
I sent this out as a patch about three weeks ago, and got absolutely
zero responses. So let's see if anybody notices now that I merge it.
Because there might be serious bugs here, but it WorksForMe(tm).
* gperf-removal:
Remove gperf usage from toolchain
Diffstat (limited to 'scripts/genksyms/lex.l')
-rw-r--r-- | scripts/genksyms/lex.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/genksyms/lex.l b/scripts/genksyms/lex.l index 5235aa507ba5..5dc25ee01c77 100644 --- a/scripts/genksyms/lex.l +++ b/scripts/genksyms/lex.l @@ -94,7 +94,7 @@ MC_TOKEN ([~%^&*+=|<>/-]=)|(&&)|("||")|(->)|(<<)|(>>) /* Bring in the keyword recognizer. */ -#include "keywords.hash.c" +#include "keywords.c" /* Macros to append to our phrase collection list. */ @@ -186,10 +186,10 @@ repeat: case IDENT: APP; { - const struct resword *r = is_reserved_word(yytext, yyleng); - if (r) + int r = is_reserved_word(yytext, yyleng); + if (r >= 0) { - switch (token = r->token) + switch (token = r) { case ATTRIBUTE_KEYW: lexstate = ST_ATTRIBUTE; |