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-16 21:56:59 +02:00
2024-10-18 11:59:04 +02:00
2024-11-13 20:11:26 +01:00
2023-03-16 12:04:00 +01:00
2024-10-18 11:59:04 +02:00
2024-07-03 19:30:18 -07:00
2023-01-23 11:33:24 +01:00
2024-09-27 08:18:43 -07:00
2024-02-13 09:06:48 +01:00
2022-10-06 10:40:21 +02:00
2024-12-02 11:34:44 -08:00
2023-02-09 16:51:39 -08:00
2024-12-01 15:12:43 -08:00
2024-04-25 20:55:53 -07:00
2023-10-09 18:14:34 +02:00
2024-10-18 11:59:04 +02:00
2024-07-01 08:47:53 +02:00
2024-09-27 08:18:43 -07:00
2024-09-25 09:54:40 +02:00
2024-02-13 09:03:31 +01:00
2023-09-19 07:04:49 +02:00
2024-07-02 09:41:46 +02:00
2024-11-18 12:24:06 -08:00
2024-05-13 18:19:09 -06:00
2023-04-24 07:27:10 +02:00
2024-09-17 08:53:17 +02:00
2023-02-18 16:50:21 +01:00
2022-11-23 19:11:22 +01:00
2023-08-21 09:54:05 +02:00
2024-02-13 09:03:34 +01:00
2023-11-13 08:14:42 +01:00
2023-10-13 15:53:57 -04:00