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