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