Peter Zijlstra
cdd30ebb1b
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498f ("treewide: Convert macro and uses of __section(foo)
to __section("foo")") and for the same reason, it is not desired for the
namespace argument to be a macro expansion itself.
Scripted using
git grep -l -e MODULE_IMPORT_NS -e EXPORT_SYMBOL_NS | while read file;
do
awk -i inplace '
/^#define EXPORT_SYMBOL_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/^#define MODULE_IMPORT_NS/ {
gsub(/__stringify\(ns\)/, "ns");
print;
next;
}
/MODULE_IMPORT_NS/ {
$0 = gensub(/MODULE_IMPORT_NS\(([^)]*)\)/, "MODULE_IMPORT_NS(\"\\1\")", "g");
}
/EXPORT_SYMBOL_NS/ {
if ($0 ~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+),/) {
if ($0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/ &&
$0 !~ /(EXPORT_SYMBOL_NS[^(]*)\(\)/ &&
$0 !~ /^my/) {
getline line;
gsub(/[[:space:]]*\\$/, "");
gsub(/[[:space:]]/, "", line);
$0 = $0 " " line;
}
$0 = gensub(/(EXPORT_SYMBOL_NS[^(]*)\(([^,]+), ([^)]+)\)/,
"\\1(\\2, \"\\3\")", "g");
}
}
{ print }' $file;
done
Requested-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://mail.google.com/mail/u/2/#inbox/FMfcgzQXKWgMmjdFwwdsfgxzKpVHWPlc
Acked-by: Greg KH <gregkh@linuxfoundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2024-12-02 11:34:44 -08:00
..
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:11 +01:00
2024-08-30 09:40:13 +01:00
2024-11-12 14:45:03 +00:00
2024-07-04 17:08:02 +01:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:08:02 +01:00
2024-08-01 14:09:28 +01:00
2024-07-04 17:38:40 +01:00
2024-07-04 17:38:40 +01:00
2024-07-04 17:08:02 +01:00
2024-09-23 16:20:55 +01:00
2024-10-16 09:04:09 +01:00
2024-10-16 09:04:10 +01:00
2024-10-31 15:51:29 +00:00
2024-10-31 15:51:29 +00:00
2024-08-30 09:40:11 +01:00
2024-11-05 16:13:47 +00:00
2024-11-01 15:56:58 +00:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-10-16 09:04:10 +01:00
2024-07-04 17:08:02 +01:00
2024-08-30 09:40:11 +01:00
2024-11-01 15:56:58 +00:00
2024-11-01 15:56:58 +00:00
2024-10-02 17:23:23 -04:00
2024-11-01 15:56:58 +00:00
2024-09-11 14:26:03 +02:00
2024-11-12 12:15:42 +00:00
2024-11-12 12:15:42 +00:00
2024-11-12 12:15:42 +00:00
2024-09-11 14:26:03 +02:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-10-31 14:59:40 +00:00
2024-10-02 17:23:23 -04:00
2024-10-31 16:18:50 +00:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:38:40 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2024-10-09 16:31:48 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-09-23 16:20:53 +01:00
2024-09-23 16:20:54 +01:00
2024-08-30 09:40:13 +01:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2024-08-30 09:40:13 +01:00
2024-10-31 16:25:03 +00:00
2024-10-31 16:25:03 +00:00
2024-11-01 15:56:58 +00:00
2024-10-02 17:23:23 -04:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-11-01 15:56:58 +00:00
2024-11-01 15:56:58 +00:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:38:40 +01:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:38:40 +01:00
2024-09-23 16:20:54 +01:00
2024-10-02 17:23:23 -04:00
2024-08-30 09:40:12 +01:00
2024-10-16 09:04:11 +01:00
2024-09-23 16:20:53 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:11 +01:00
2024-11-01 15:53:05 +00:00
2024-10-16 09:04:11 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2024-11-06 08:04:24 +00:00
2024-10-16 09:04:10 +01:00
2024-10-02 17:23:23 -04:00
2024-11-01 15:56:58 +00:00
2024-08-30 09:40:13 +01:00
2024-07-04 17:38:40 +01:00
2024-11-01 15:56:58 +00:00
2024-07-04 17:08:02 +01:00
2024-10-16 09:04:09 +01:00
2024-09-23 16:20:54 +01:00
2024-11-01 15:56:58 +00:00
2024-07-11 16:38:23 +01:00
2024-08-30 09:40:11 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00
2024-10-16 09:04:09 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2024-08-30 09:40:12 +01:00
2024-11-01 15:56:58 +00:00
2024-08-30 09:40:12 +01:00
2024-07-04 17:38:40 +01:00
2024-07-04 17:38:40 +01:00
2024-11-12 14:47:00 +00:00
2024-11-01 15:56:58 +00:00
2024-08-30 09:40:12 +01:00
2024-10-25 09:48:58 +01:00
2024-07-04 17:38:40 +01:00
2024-10-16 09:04:10 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:08:02 +01:00
2024-07-04 17:38:40 +01:00