diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 14:12:19 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-09-08 14:12:19 -0700 |
commit | dab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528 (patch) | |
tree | 6bbe14d6ec101bc278a8166469fdaa07d8f6493c /scripts/basic/fixdep.c | |
parent | Merge tag 'trace-v4.3' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (diff) | |
parent | kbuild: Fix clang detection (diff) | |
download | linux-dev-dab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528.tar.xz linux-dev-dab3c3cc4f44273ccf2d7ff57c0a4f5bd45c0528.zip |
Merge branch 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull core kbuild updates from Michal Marek:
- modpost portability fix
- linker script fix
- genksyms segfault fix
- fixdep cleanup
- fix for clang detection
* 'kbuild' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild:
kbuild: Fix clang detection
kbuild: fixdep: drop meaningless hash table initialization
kbuild: fixdep: optimize code slightly
genksyms: Regenerate parser
genksyms: Duplicate function pointer type definitions segfault
kbuild: Fix .text.unlikely placement
Avoid conflict with host definitions when cross-compiling
Diffstat (limited to 'scripts/basic/fixdep.c')
-rw-r--r-- | scripts/basic/fixdep.c | 26 |
1 files changed, 4 insertions, 22 deletions
diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index b30406860b73..c68fd61fdc42 100644 --- a/scripts/basic/fixdep.c +++ b/scripts/basic/fixdep.c @@ -192,23 +192,6 @@ static void define_config(const char *name, int len, unsigned int hash) } /* - * Clear the set of configuration strings. - */ -static void clear_config(void) -{ - struct item *aux, *next; - unsigned int i; - - for (i = 0; i < HASHSZ; i++) { - for (aux = hashtab[i]; aux; aux = next) { - next = aux->next; - free(aux); - } - hashtab[i] = NULL; - } -} - -/* * Record the use of a CONFIG_* word. */ static void use_config(const char *m, int slen) @@ -251,7 +234,8 @@ static void parse_config_file(const char *map, size_t len) continue; if (memcmp(p, "CONFIG_", 7)) continue; - for (q = p + 7; q < map + len; q++) { + p += 7; + for (q = p; q < map + len; q++) { if (!(isalnum(*q) || *q == '_')) goto found; } @@ -260,9 +244,9 @@ static void parse_config_file(const char *map, size_t len) found: if (!memcmp(q - 7, "_MODULE", 7)) q -= 7; - if( (q-p-7) < 0 ) + if (q - p < 0) continue; - use_config(p+7, q-p-7); + use_config(p, q - p); } } @@ -324,8 +308,6 @@ static void parse_dep_file(void *map, size_t len) int saw_any_target = 0; int is_first_dep = 0; - clear_config(); - while (m < end) { /* Skip any "white space" */ while (m < end && (*m == ' ' || *m == '\\' || *m == '\n')) |