From patchwork Fri Jul 24 05:18:46 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 6857331 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CDB349F358 for ; Fri, 24 Jul 2015 05:21:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0E04E20532 for ; Fri, 24 Jul 2015 05:21:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 26BF02052A for ; Fri, 24 Jul 2015 05:21:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751250AbbGXFVx (ORCPT ); Fri, 24 Jul 2015 01:21:53 -0400 Received: from condef009-v.nifty.com ([210.131.4.246]:40084 "EHLO condef009-v.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751053AbbGXFVx (ORCPT ); Fri, 24 Jul 2015 01:21:53 -0400 Received: from conuserg010-v.nifty.com ([10.16.229.197])by condef009-v.nifty.com with ESMTP id t6O5JNW6021264 for ; Fri, 24 Jul 2015 14:19:23 +0900 Received: from beagle.diag.org (KD036014048188.au-net.ne.jp [36.14.48.188]) (authenticated) by conuserg010-v.nifty.com with ESMTP id t6O5Ivrr002002; Fri, 24 Jul 2015 14:19:05 +0900 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-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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'))