Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp4788537ybg; Tue, 29 Oct 2019 12:24:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqy8eOF6EDGBueVuGvktLnALxt7jcqLRpyPExyCY8YUbUnw65bQM7iA6Awhi3+CnWrqRzsZe X-Received: by 2002:aa7:c2d0:: with SMTP id m16mr10536196edp.215.1572377040589; Tue, 29 Oct 2019 12:24:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572377040; cv=none; d=google.com; s=arc-20160816; b=b+on6fE2WDwhYtqTSJjtQiAIUMozwwls66Cr+sQ9yQg3rYO2FADpzX98wPvj9IKfNO wbLmeWjoAS384mBf9tSaXM8mDP9dkchccWtoXBPBXGGJyuYyJi3jmBZilgF9iyHn1gyC HPspe2BLkbnVQIL9PY5cXSLkYlzISuznOvbByruhoFHx3CeKR8pbell5YVmpQWxHzyWo gwwqjrKF0WOO4GmnKFXUOeRbsqBpkREqBtBFjwyB5wkf5qXU3KooaVVHfKWq/4UqqQSL vQ8hRFEOAmj8Qz3HPbePYIBZ3Wj9vQhomU9kGtsvcGmBcKmEFDuZdGfIaOaa2irJpvBx mHFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter; bh=rRs8Ed7t4bAer/X1dc9tlKv3gE2rP5G57gkcJJvIIzs=; b=Tl/ZyjISVy7u/m2Xgyxl3Rr1IU60IyHV0WyousS1gixOL8PsZZXoDrouFvwXcfvh1H uvzow4yNwAzrldHV5Pjn2u+leMOA9Gdxmi9ySQ7oOKHex2WyHdTFdTJ3lz7prWRJ5TQJ Jhkdl3+zBjeZtMuzPjN7OMUy3W165MKPdKXfCujfzZeuW3A3yAaFRq8YJqMQAS4cZZje BTfK4UGt6tzeSBc2r3ck24v617GmybcVL4L3I/FYsbMPvhiTFRRSLFYJ+WSpczJyvawi thxjSqS4Uba9ud4Mt2DH0fAFUZw+ugI3A0EP+I7uyEJI7kczWLZ+KdfuKpE1FTNokcWz aRFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Wx5lpNCA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v16si9584408edc.142.2019.10.29.12.23.37; Tue, 29 Oct 2019 12:24:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=Wx5lpNCA; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728004AbfJ2Min (ORCPT + 99 others); Tue, 29 Oct 2019 08:38:43 -0400 Received: from conuserg-12.nifty.com ([210.131.2.79]:33928 "EHLO conuserg-12.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726711AbfJ2Min (ORCPT ); Tue, 29 Oct 2019 08:38:43 -0400 Received: from localhost.localdomain (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id x9TCcFU9026616; Tue, 29 Oct 2019 21:38:21 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com x9TCcFU9026616 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1572352702; bh=rRs8Ed7t4bAer/X1dc9tlKv3gE2rP5G57gkcJJvIIzs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Wx5lpNCAWh0/fyhSglgPtgut//wljqNN4vx7Lbqx1ZhuPpRivg83hoCLnyCcntuzu U9RPsoIpsytpjbkToeJY+5WYt82+HYbs0pJd3BtbJMfMcBPcgOHuPZ2a+NbVs/4KBY AKaFq3Ky3cZ2t+BemZLqYWnSPrH/mekrlSpwcMCUWODxeoUYzmpnP8MVzO2qdSAZdt s27bGUd7tePUX8QCrh9dwaykFQx/SvgZ/ao/EBBNfww0FW6fZ59oWvrTJFa6Sda5U6 aU/iw2JlhQxBCOIFNY5eUHLyP/Je4/BknAL4de9oZJP9A5eA20yaCwVQIkIN8cP014 Qgm4BCvojQSxw== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Jessica Yu , Matthias Kaehlcke , Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH 4/4] mospost: remove unneeded local variable in contains_namespace() Date: Tue, 29 Oct 2019 21:38:09 +0900 Message-Id: <20191029123809.29301-5-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191029123809.29301-1-yamada.masahiro@socionext.com> References: <20191029123809.29301-1-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The local variable, ns_entry, is unneeded. While I was here, I also cleaned up the comparison with NULL or 0. Signed-off-by: Masahiro Yamada --- scripts/mod/modpost.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index f7425f5d4ab0..f70b924f379f 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -239,10 +239,8 @@ static struct symbol *find_symbol(const char *name) static bool contains_namespace(struct namespace_list *list, const char *namespace) { - struct namespace_list *ns_entry; - - for (ns_entry = list; ns_entry != NULL; ns_entry = ns_entry->next) - if (strcmp(ns_entry->namespace, namespace) == 0) + for (; list; list = list->next) + if (!strcmp(list->namespace, namespace)) return true; return false; -- 2.17.1