summaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2020-06-01 14:57:28 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2020-06-06 23:39:20 +0900
commit858b937d289bbf7551d496100c1fa9efcad5796e (patch)
treefedfc88235aa8cbfc1349791875fb6c585e33c42 /scripts/mod/modpost.c
parent0b19d54cae11bd5b9e208f52e42d88ad33a3b1d9 (diff)
downloadlinux-858b937d289bbf7551d496100c1fa9efcad5796e.tar.bz2
modpost: set have_vmlinux in new_module()
Set have_vmlinux flag in a single place. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Diffstat (limited to 'scripts/mod/modpost.c')
-rw-r--r--scripts/mod/modpost.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 925c1a1856aa..b317328ae21b 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -192,6 +192,9 @@ static struct module *new_module(const char *modname)
mod->next = modules;
modules = mod;
+ if (mod->is_vmlinux)
+ have_vmlinux = 1;
+
return mod;
}
@@ -2012,9 +2015,6 @@ static void read_symbols(const char *modname)
mod = new_module(modname);
- if (mod->is_vmlinux)
- have_vmlinux = 1;
-
if (!mod->is_vmlinux) {
license = get_modinfo(&info, "license");
if (!license)
@@ -2470,8 +2470,6 @@ static void read_dump(const char *fname)
mod = find_module(modname);
if (!mod) {
mod = new_module(modname);
- if (mod->is_vmlinux)
- have_vmlinux = 1;
mod->from_dump = 1;
}
s = sym_add_exported(symname, mod, export_no(export));