These changes are the raw update to linux-4.4.6-rt14. Kernel sources
[kvmfornfv.git] / kernel / scripts / basic / fixdep.c
index b304068..c68fd61 100644 (file)
@@ -191,23 +191,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.
  */
@@ -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'))