]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
scripts: Coccinelle script for namespace dependencies.
authorMatthias Maennich <maennich@google.com>
Fri, 6 Sep 2019 10:32:32 +0000 (11:32 +0100)
committerJessica Yu <jeyu@kernel.org>
Tue, 10 Sep 2019 08:30:43 +0000 (10:30 +0200)
commiteb8305aecb958e8787e7d603c7765c1dcace3a2b
tree03a29689498344ac197a953e3eb748d4d58794fc
parent1d082773ff30e97c8bc10b65c4aa0d073664caac
scripts: Coccinelle script for namespace dependencies.

A script that uses the '<module>.ns_deps' files generated by modpost to
automatically add the required symbol namespace dependencies to each
module.

Usage:
1) Move some symbols to a namespace with EXPORT_SYMBOL_NS() or define
   DEFAULT_SYMBOL_NAMESPACE
2) Run 'make' (or 'make modules') and get warnings about modules not
   importing that namespace.
3) Run 'make nsdeps' to automatically add required import statements
   to said modules.

This makes it easer for subsystem maintainers to introduce and maintain
symbol namespaces into their codebase.

Co-developed-by: Martijn Coenen <maco@android.com>
Signed-off-by: Martijn Coenen <maco@android.com>
Acked-by: Julia Lawall <julia.lawall@lip6.fr>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Jessica Yu <jeyu@kernel.org>
MAINTAINERS
Makefile
scripts/Makefile.modpost
scripts/coccinelle/misc/add_namespace.cocci [new file with mode: 0644]
scripts/nsdeps [new file with mode: 0644]