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-11-04 01:27:52 +01:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-03-26 10:43:35 +01:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-11-13 15:09:50 +01:00
2023-08-09 14:16:06 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2023-05-13 17:33:18 +09:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-03-26 10:43:35 +01:00
2023-08-12 10:03:22 +02:00
2024-10-04 15:13:03 +02:00
2024-11-16 09:04:06 +01:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-03-26 10:43:35 +01:00
2024-10-04 15:13:03 +02:00
2022-09-01 16:08:29 +02:00
2024-10-04 15:08:37 +02:00
2022-09-01 16:08:29 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-14 08:03:44 +02:00
2024-08-07 12:51:38 +02:00
2023-03-21 14:06:11 +01:00
2023-12-15 13:55:30 +01:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-14 08:03:44 +02:00
2024-10-04 15:13:03 +02:00
2024-10-02 17:23:23 -04:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2023-05-13 17:33:18 +09:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2023-01-12 10:53:12 +01:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2024-10-04 15:13:03 +02:00
2023-10-02 09:48:52 -07:00
2024-11-13 15:09:50 +01:00
2023-10-02 16:19:13 +02:00
2023-10-02 16:19:12 +02:00
2024-11-13 15:09:50 +01:00
2024-10-14 08:03:44 +02:00
2024-10-04 15:13:03 +02:00
2023-05-29 15:29:03 +01:00
2023-05-29 15:29:03 +01:00
2023-05-28 15:25:53 +01:00
2024-10-04 15:13:03 +02:00
2022-12-15 16:06:10 +01:00
2024-01-27 17:39:09 -08:00
2024-11-06 13:26:14 +01:00
2024-10-17 08:45:36 +02:00
2024-10-17 08:45:36 +02:00
2024-11-06 13:26:14 +01:00
2024-09-03 09:54:39 +02:00
2024-10-04 15:13:03 +02:00
2024-10-14 08:03:44 +02:00
2024-11-06 13:26:16 +01:00
2024-03-02 20:25:27 +01:00
2024-10-04 15:13:03 +02:00
2024-01-04 16:05:50 +01:00
2023-02-06 13:46:42 +01:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-08-07 12:51:38 +02:00
2024-10-04 15:13:03 +02:00
2024-04-23 16:25:29 -07:00
2024-01-27 17:39:09 -08:00
2024-10-04 15:13:03 +02:00
2024-11-06 13:26:16 +01:00
2024-04-23 16:25:29 -07:00
2023-01-25 15:48:17 +01:00
2024-10-21 08:53:43 +02:00
2023-03-23 17:25:22 +01:00
2024-11-06 13:26:14 +01:00
2024-11-06 13:26:16 +01:00
2024-11-06 13:26:16 +01:00