Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753037AbbGXFT1 (ORCPT ); Fri, 24 Jul 2015 01:19:27 -0400 Received: from conuserg010.nifty.com ([202.248.44.36]:62582 "EHLO conuserg010-v.nifty.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751184AbbGXFTX (ORCPT ); Fri, 24 Jul 2015 01:19:23 -0400 X-Nifty-SrcIP: [36.14.48.188] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 2/2] kbuild: fixdep: drop meaningless hash table initialization Date: Fri, 24 Jul 2015 14:18:46 +0900 Message-Id: <1437715126-6421-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1437715126-6421-1-git-send-email-yamada.masahiro@socionext.com> References: <1437715126-6421-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1441 Lines: 55 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 --- scripts/basic/fixdep.c | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c index 46cc1b3..c68fd61 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) @@ -325,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')) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/