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-12-02 11:34:44 -08:00
2024-11-18 20:23:07 -05:00
2023-08-29 17:45:22 -04:00
2024-02-28 16:18:18 -05:00
2019-02-14 11:48:36 -05:00
2023-09-27 15:16:40 -04:00
2022-03-22 15:52:55 -04:00
2023-12-15 14:19:48 -08:00
2023-10-16 12:44:08 -04:00
2024-11-18 20:23:05 -05:00
2024-09-23 15:03:30 -04:00
2022-05-19 12:25:38 -04:00
2022-05-19 12:25:38 -04:00
2023-08-29 17:45:22 -04:00
2023-06-19 12:18:36 -04:00
2023-02-20 09:20:57 -05:00
2024-09-27 08:18:43 -07:00
2023-11-01 15:40:44 -04:00
2024-07-18 10:49:12 -04:00
2022-11-25 13:01:55 -05:00
2020-03-16 12:04:33 -04:00
2024-03-01 09:12:09 -05:00
2024-01-11 16:16:08 -08:00
2024-09-01 10:04:56 -04:00
2024-09-23 15:03:30 -04:00
2024-09-30 15:37:07 -04:00
2024-09-23 15:03:30 -04:00
2024-09-23 15:03:30 -04:00
2024-11-30 10:17:53 -08:00
2024-07-24 20:59:29 +02:00
2023-06-19 12:28:10 -04:00
2023-06-19 15:04:13 -04:00
2019-05-21 10:50:45 +02:00
2023-08-31 15:36:41 -07:00
2024-02-28 15:00:14 -05:00
2024-01-04 10:47:56 -05:00
2024-11-28 12:55:32 -05:00