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