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