aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/mod/modpost.h
diff options
context:
space:
mode:
authorMasahiro Yamada <yamada.masahiro@socionext.com>2019-10-29 21:38:07 +0900
committerMasahiro Yamada <yamada.masahiro@socionext.com>2019-11-11 20:10:01 +0900
commitbbc55bded4aaf47d6f2bd9389fc8d3a3821d18c0 (patch)
tree4530ad6400d9e0798059644098cf66bbb15da074 /scripts/mod/modpost.h
parentmodpost: free ns_deps_buf.p after writing ns_deps files (diff)
downloadlinux-dev-bbc55bded4aaf47d6f2bd9389fc8d3a3821d18c0.tar.xz
linux-dev-bbc55bded4aaf47d6f2bd9389fc8d3a3821d18c0.zip
modpost: dump missing namespaces into a single modules.nsdeps file
The modpost, with the -d option given, generates per-module .ns_deps files. Kbuild generates per-module .mod files to carry module information. This is convenient because Make handles multiple jobs in parallel when the -j option is given. On the other hand, the modpost always runs as a single thread. I do not see a strong reason to produce separate .ns_deps files. This commit changes the modpost to generate just one file, modules.nsdeps, each line of which has the following format: <module_name>: <list of missing namespaces> Please note it contains *missing* namespaces instead of required ones. So, modules.nsdeps is empty if the namespace dependency is all good. This will work more efficiently because spatch will no longer process already imported namespaces. I removed the '(if needed)' from the nsdeps log since spatch is invoked only when needed. This also solves the stale .ns_deps problem reported by Jessica Yu: https://lkml.org/lkml/2019/10/28/467 Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Tested-by: Jessica Yu <jeyu@kernel.org> Acked-by: Jessica Yu <jeyu@kernel.org> Reviewed-by: Matthias Maennich <maennich@google.com> Tested-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to '')
-rw-r--r--scripts/mod/modpost.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/mod/modpost.h b/scripts/mod/modpost.h
index ad271bc6c313..fe6652535e4b 100644
--- a/scripts/mod/modpost.h
+++ b/scripts/mod/modpost.h
@@ -126,8 +126,8 @@ struct module {
struct buffer dev_table_buf;
char srcversion[25];
int is_dot_o;
- // Required namespace dependencies
- struct namespace_list *required_namespaces;
+ // Missing namespace dependencies
+ struct namespace_list *missing_namespaces;
// Actual imported namespaces
struct namespace_list *imported_namespaces;
};