summaryrefslogtreecommitdiff
path: root/scripts/coccinelle/misc
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-12-03 19:21:05 +0900
committerLinus Torvalds <torvalds@linux-foundation.org>2024-12-03 08:22:25 -0800
commit62aa6f2ede976dfb3539e59ee55c62cfd3c3faa3 (patch)
tree87194ea3397a0cbb41c0436c7eb6307265295f38 /scripts/coccinelle/misc
parentcdd30ebb1b9f36159d66f088b61aee264e649d7a (diff)
scripts/nsdeps: get 'make nsdeps' working again
Since commit cdd30ebb1b9f ("module: Convert symbol namespace to string literal"), when MODULE_IMPORT_NS() is missing, 'make nsdeps' inserts pointless code: MODULE_IMPORT_NS("ns"); Here, "ns" is not a namespace, but the variable in the semantic patch. It must not be quoted. Instead, a string literal must be passed to Coccinelle. Fixes: cdd30ebb1b9f ("module: Convert symbol namespace to string literal") Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'scripts/coccinelle/misc')
-rw-r--r--scripts/coccinelle/misc/add_namespace.cocci4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/coccinelle/misc/add_namespace.cocci b/scripts/coccinelle/misc/add_namespace.cocci
index d66c4e3cd946..cbf1614163cb 100644
--- a/scripts/coccinelle/misc/add_namespace.cocci
+++ b/scripts/coccinelle/misc/add_namespace.cocci
@@ -13,7 +13,7 @@ virtual report
declarer name MODULE_IMPORT_NS;
identifier virtual.ns;
@@
-MODULE_IMPORT_NS("ns");
+MODULE_IMPORT_NS(ns);
// Add missing imports, but only adjacent to a MODULE_LICENSE statement.
// That ensures we are adding it only to the main module source file.
@@ -23,7 +23,7 @@ expression license;
identifier virtual.ns;
@@
MODULE_LICENSE(license);
-+ MODULE_IMPORT_NS("ns");
++ MODULE_IMPORT_NS(ns);
// Dummy rule for report mode that would otherwise be empty and make spatch
// fail ("No rules apply.")