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
..
2023-11-23 09:01:47 +01:00
2024-05-10 04:34:52 +09:00
2024-08-30 15:17:03 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-28 18:56:03 +01:00
2024-11-21 14:56:17 -08:00
2024-11-04 09:41:38 +00:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:47 +01:00
2023-12-04 09:41:34 +01:00
2023-11-23 09:01:46 +01:00
2023-12-04 09:41:59 +01:00
2024-11-04 09:41:32 +00:00
2024-12-02 11:34:44 -08:00
2023-11-23 09:01:46 +01:00
2023-11-28 13:55:44 +01:00
2023-11-23 09:01:46 +01:00
2023-11-28 18:56:03 +01:00
2023-12-04 09:41:48 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2024-04-29 12:31:28 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2024-04-25 17:05:48 +03:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-28 18:56:03 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-12-15 14:04:08 +01:00
2023-11-28 18:56:03 +01:00
2024-09-02 09:54:13 +01:00
2023-11-23 09:01:47 +01:00
2023-12-08 10:25:24 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:46 +01:00
2024-09-06 18:05:52 +02:00
2023-11-28 18:56:03 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-28 13:55:37 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:45 +01:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:46 +01:00
2023-11-23 09:01:47 +01:00
2023-11-23 09:01:47 +01:00
2024-05-19 09:21:03 -07:00
2023-11-23 09:01:46 +01:00
2024-11-21 14:56:17 -08:00
2024-11-04 09:41:38 +00:00