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