Skip to content

Commit d179e22

Browse files
masahir0yMichal Marek
authored andcommitted
kbuild: fixdep: drop meaningless hash table initialization
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. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Michal Marek <mmarek@suse.com>
1 parent d721109 commit d179e22

1 file changed

Lines changed: 0 additions & 19 deletions

File tree

scripts/basic/fixdep.c

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -191,23 +191,6 @@ static void define_config(const char *name, int len, unsigned int hash)
191191
hashtab[hash % HASHSZ] = aux;
192192
}
193193

194-
/*
195-
* Clear the set of configuration strings.
196-
*/
197-
static void clear_config(void)
198-
{
199-
struct item *aux, *next;
200-
unsigned int i;
201-
202-
for (i = 0; i < HASHSZ; i++) {
203-
for (aux = hashtab[i]; aux; aux = next) {
204-
next = aux->next;
205-
free(aux);
206-
}
207-
hashtab[i] = NULL;
208-
}
209-
}
210-
211194
/*
212195
* Record the use of a CONFIG_* word.
213196
*/
@@ -325,8 +308,6 @@ static void parse_dep_file(void *map, size_t len)
325308
int saw_any_target = 0;
326309
int is_first_dep = 0;
327310

328-
clear_config();
329-
330311
while (m < end) {
331312
/* Skip any "white space" */
332313
while (m < end && (*m == ' ' || *m == '\\' || *m == '\n'))

0 commit comments

Comments
 (0)