From patchwork Sun May 24 15:42:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 11567471 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 20AD5166C for ; Sun, 24 May 2020 15:44:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 08BEB20826 for ; Sun, 24 May 2020 15:44:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1590335058; bh=HpBaSOXGk3blPjBqeCfvwYqQzVHDrVUTmqdHphvQTB0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=RGaSUW+ymoCdPK+7cJQLdsaPe+7jkEW4XpJcHtBOoHkTSvbaVFTbNGTsBxWkkZCSJ v7cTSqA6sk9N2TuJ+aKUWJACJvYiAf/oXlcRd23YaIx10HsjghpBamh04WPbBaZR02 Iax2IpOKv2IOp1oGai9b/bM7BfyKNUwNGmXM2BCI= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387868AbgEXPoR (ORCPT ); Sun, 24 May 2020 11:44:17 -0400 Received: from conuserg-09.nifty.com ([210.131.2.76]:19698 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728363AbgEXPnX (ORCPT ); Sun, 24 May 2020 11:43:23 -0400 Received: from oscar.flets-west.jp (softbank126090202047.bbtec.net [126.90.202.47]) (authenticated) by conuserg-09.nifty.com with ESMTP id 04OFgcVA017561; Mon, 25 May 2020 00:42:52 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com 04OFgcVA017561 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1590334972; bh=8bnol5qMntt9tF6AgWNimoDgAu0jzWIxPueeiUc9cuk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wL5ohEUuvjdLZr2FOn6XUryfD0mGmDIoLXGfKjLvk/tJDsMrAzw7Igv8ZN78fgEMW +WsdxEaRb4UqFEY38Uqjn0Od58F9kNUmQpR5Lh77H8QIFauXHP5unFn9OlFtF8uRmC 7ifMOilfZSB0MWWh4C6bpInleB+ICMS6VMtrHP55FVjiQ2+pj/ZqpeuGpspLma6WPQ VHCS/wUsXmSfVP5hjkdSwL9RaK+xPzj7l1ui6WMiL6Zxsc1IyyBnPjdeYowhCOUyLE ihXqH12XKKu8a8O2jcCRvtA/zKkuG6VOshe3n87F6091Y92wbHPsy7CgJqlEYhhB39 QpK6zjBaE77ew== X-Nifty-SrcIP: [126.90.202.47] From: Masahiro Yamada To: linux-kbuild@vger.kernel.org Cc: Masahiro Yamada , Michal Marek , linux-kernel@vger.kernel.org Subject: [PATCH v2 25/29] modpost: remove mod->skip struct member Date: Mon, 25 May 2020 00:42:31 +0900 Message-Id: <20200524154235.380482-26-masahiroy@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200524154235.380482-1-masahiroy@kernel.org> References: <20200524154235.380482-1-masahiroy@kernel.org> MIME-Version: 1.0 Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org The meaning of 'skip' is obscure since it does not explain "what to skip". mod->skip is set when it is vmlinux or the module info came from a dump file. So, mod->skip is equivalent to (mod->is_vmlinux || mod->from_dump). For the check in write_namespace_deps_files(), mod->is_vmlinux is unneeded because the -d option is not passed in the first pass of modpost. Signed-off-by: Masahiro Yamada --- Changes in v2: None scripts/mod/modpost.c | 9 +++------ scripts/mod/modpost.h | 1 - 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 0d065f8f5087..fdf843323d98 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -2012,10 +2012,8 @@ static void read_symbols(const char *modname) mod = new_module(modname); - if (mod->is_vmlinux) { + if (mod->is_vmlinux) have_vmlinux = 1; - mod->skip = 1; - } if (!mod->is_vmlinux) { license = get_modinfo(&info, "license"); @@ -2466,7 +2464,6 @@ static void read_dump(const char *fname) mod = new_module(modname); if (mod->is_vmlinux) have_vmlinux = 1; - mod->skip = 1; mod->from_dump = 1; } s = sym_add_exported(symname, mod, export_no(export)); @@ -2527,7 +2524,7 @@ static void write_namespace_deps_files(const char *fname) for (mod = modules; mod; mod = mod->next) { - if (mod->skip || !mod->missing_namespaces) + if (mod->from_dump || !mod->missing_namespaces) continue; buf_printf(&ns_deps_buf, "%s.ko:", mod->name); @@ -2632,7 +2629,7 @@ int main(int argc, char **argv) for (mod = modules; mod; mod = mod->next) { char fname[PATH_MAX]; - if (mod->skip) + if (mod->is_vmlinux || mod->from_dump) continue; buf.pos = 0; diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h index ec717ab20b98..264c0c51defa 100644 --- a/scripts/mod/modpost.h +++ b/scripts/mod/modpost.h @@ -122,7 +122,6 @@ struct module { int from_dump; /* 1 if module was loaded from *.symver */ int is_vmlinux; int seen; - int skip; int has_init; int has_cleanup; struct buffer dev_table_buf;