]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
kbuild: fixdep: drop meaningless hash table initialization
authorMasahiro Yamada <yamada.masahiro@socionext.com>
Tue, 15 Sep 2015 03:54:38 +0000 (12:54 +0900)
committerTom Rini <trini@konsulko.com>
Tue, 15 Sep 2015 19:05:23 +0000 (15:05 -0400)
The clear_config() is called just once at the beginning of this
program, but the global variable hashtab[] is already zero-filled
at the start-up.

[ Linux commit: d179e22762fd38414c4108acedd5feca4cf7e0d8 ]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Michal Marek <mmarek@suse.com>
scripts/basic/fixdep.c

index 20fed03beabad5c5b915e51763e338c7ab8833f4..074234fd5d9e5484644ee9633ad00a89da50fff6 100644 (file)
@@ -192,23 +192,6 @@ static void define_config(const char *name, int len, unsigned int hash)
        hashtab[hash % HASHSZ] = aux;
 }
 
-/*
- * 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.
  */
@@ -347,8 +330,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'))