aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.c
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-10-29 21:38:06 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-11 20:10:01 +0900
commitbff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6 (patch)
treeb8178452dcff6dff6594d7b77344363c1292d20c /scripts/mod/modpost.c
parentscripts/ver_linux: add Bison and Flex to the checklist (diff)
downloadlinux-dev-bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6.tar.xz
linux-dev-bff9c62b5d20d26f54bab81b33b6d9d1f9afcdf6.zip
modpost: do not invoke extra modpost for nsdeps
'make nsdeps' invokes the modpost three times at most; before linking vmlinux, before building modules, and finally for generating .ns_deps files. Running the modpost again and again is not efficient. The last two can be unified. When the -d option is given, the modpost still does the usual job, and in addition, generates .ns_deps files. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Tested-by: Matthias Maennich <maennich@google.com> Reviewed-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to '')
-rw-r--r--scripts/mod/modpost.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 37fa1c65ee4d..1de983d9a05d 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -2221,8 +2221,7 @@ static int check_exports(struct module *mod)
add_namespace(&mod->required_namespaces,
exp->namespace);
- if (!write_namespace_deps &&
- !module_imports_namespace(mod, exp->namespace)) {
+ if (!module_imports_namespace(mod, exp->namespace)) {
warn("module %s uses symbol %s from namespace %s, but does not import it.\n",
basename, exp->name, exp->namespace);
}
@@ -2642,8 +2641,6 @@ int main(int argc, char **argv)
err |= check_modname_len(mod);
err |= check_exports(mod);
- if (write_namespace_deps)
- continue;
add_header(&buf, mod);
add_intree_flag(&buf, !external_module);
@@ -2658,10 +2655,8 @@ int main(int argc, char **argv)
write_if_changed(&buf, fname);
}
- if (write_namespace_deps) {
+ if (write_namespace_deps)
write_namespace_deps_files();
- return 0;
- }
if (dump_write)
write_dump(dump_write);