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