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