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-10-15 13:50:10 +01:00
2024-11-29 11:58:27 -08:00
2023-04-13 13:13:51 -07:00
2024-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-11-29 11:58:27 -08:00
2024-11-12 12:55:56 +01:00
2024-06-24 10:08:53 +02:00
2024-11-29 11:58:27 -08:00
2024-10-31 17:52:13 +00:00
2024-11-20 15:40:54 -08:00
2024-11-07 11:18:52 +00:00
2024-10-24 18:38:07 +02:00
2024-11-29 11:58:27 -08:00
2024-11-29 11:58:27 -08:00
2024-10-23 16:19:03 +01:00
2024-10-02 17:23:23 -04:00
2024-04-08 09:34:24 +02:00
2023-05-31 19:17:29 +01:00
2023-03-09 18:07:33 +01:00
2023-06-26 07:47:11 +02:00
2024-02-14 10:09:13 +01:00
2024-01-12 13:54:25 -08:00
2024-10-13 17:22:33 +02:00
2024-11-12 12:55:56 +01:00
2024-11-12 12:55:56 +01:00
2024-11-12 12:55:56 +01:00
2024-11-12 12:55:56 +01:00
2024-11-12 12:55:56 +01:00
2024-02-14 10:09:17 +01:00
2024-11-19 10:25:47 -08:00
2024-10-25 12:56:37 -05:00
2024-10-25 10:45:07 -05:00
2024-11-12 16:03:34 +01:00