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-11-13 16:17:57 +01:00
2024-12-02 11:34:44 -08:00
2024-11-13 16:17:57 +01:00
2024-11-26 13:28:43 +01:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-11-26 13:28:43 +01:00
2024-11-14 17:40:47 +01:00
2024-11-22 19:43:18 -08:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-04-24 12:08:00 +02:00
2023-12-21 12:05:48 +01:00
2024-11-13 16:17:57 +01:00
2023-08-16 12:09:19 +02:00
2024-03-27 16:27:39 +01:00
2024-11-13 16:17:57 +01:00
2024-10-23 11:57:11 +02:00
2024-10-23 11:57:11 +02:00
2024-11-26 13:27:56 +01:00
2024-10-24 14:48:23 +02:00
2024-04-24 20:42:10 +02:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-09-04 15:31:29 +02:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-11-13 18:37:00 +01:00
2024-11-16 10:09:30 -06:00
2021-01-19 22:31:10 +01:00
2024-11-13 16:17:57 +01:00
2024-04-23 12:40:30 +02:00
2024-11-26 18:05:44 -08:00
2023-10-15 23:40:10 +02:00
2024-11-16 10:09:30 -06:00
2024-09-02 13:17:46 +02:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-11-13 16:17:57 +01:00
2024-11-26 13:28:43 +01:00
2024-10-24 17:15:07 +02:00
2024-10-24 17:15:07 +02:00
2024-10-24 14:48:23 +02:00
2024-06-11 21:04:00 +02:00
2024-10-24 14:48:23 +02:00
2024-12-02 11:34:44 -08:00
2023-03-03 20:45:02 +01:00
2023-03-03 20:45:02 +01:00
2024-10-24 14:54:01 +02:00
2024-10-24 14:54:01 +02:00
2024-11-26 13:28:43 +01:00
2024-10-24 14:48:23 +02:00
2024-10-24 15:00:18 +02:00
2024-10-24 14:54:01 +02:00
2024-04-08 16:01:20 +02:00
2024-05-22 20:14:47 -04:00
2024-10-24 17:15:07 +02:00
2024-07-15 13:31:41 +02:00
2024-11-13 16:17:57 +01:00