From: Masahiro Yamada <masahiroy@kernel.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Peter Zijlstra <peterz@infradead.org>,
Matthias Maennich <maennich@google.com>,
linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
Masahiro Yamada <masahiroy@kernel.org>
Subject: [PATCH 1/3] scripts/nsdeps: get 'make nsdeps' working again
Date: Tue, 3 Dec 2024 19:21:05 +0900 [thread overview]
Message-ID: <20241203102124.3147478-2-masahiroy@kernel.org> (raw)
In-Reply-To: <20241203102124.3147478-1-masahiroy@kernel.org>
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>
---
scripts/coccinelle/misc/add_namespace.cocci | 4 ++--
scripts/nsdeps | 2 +-
2 files changed, 3 insertions(+), 3 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.")
diff --git a/scripts/nsdeps b/scripts/nsdeps
index bab4ec870e50..a3372166ac01 100644
--- a/scripts/nsdeps
+++ b/scripts/nsdeps
@@ -21,7 +21,7 @@ fi
generate_deps_for_ns() {
$SPATCH --very-quiet --in-place --sp-file \
- $srctree/scripts/coccinelle/misc/add_namespace.cocci -D nsdeps -D ns=$1 $2
+ $srctree/scripts/coccinelle/misc/add_namespace.cocci -D nsdeps -D ns=\"$1\" $2
}
generate_deps() {
--
2.43.0
next prev parent reply other threads:[~2024-12-03 10:21 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 10:21 [PATCH 0/3] module: fixups after module namespace conversion Masahiro Yamada
2024-12-03 10:21 ` Masahiro Yamada [this message]
2024-12-03 10:21 ` [PATCH 2/3] doc: module: revert misconversions for MODULE_IMPORT_NS() Masahiro Yamada
2024-12-03 10:21 ` [PATCH 3/3] module: Convert default symbol namespace to string literal Masahiro Yamada
2024-12-03 10:41 ` Uwe Kleine-König
2024-12-03 10:26 ` [PATCH 0/3] module: fixups after module namespace conversion Peter Zijlstra
2024-12-03 11:09 ` Masahiro Yamada
2024-12-03 16:23 ` Linus Torvalds
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241203102124.3147478-2-masahiroy@kernel.org \
--to=masahiroy@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maennich@google.com \
--cc=peterz@infradead.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.