Peter Zijlstra
cdd30ebb1b
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("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-03-08 12:05:10 +01:00
2024-09-27 08:18:43 -07:00
2024-11-11 23:10:54 +01:00
2024-11-12 15:05:31 +01:00
2024-06-28 00:24:43 +02:00
2021-08-10 00:09:21 +02:00
2024-11-12 15:05:31 +01:00
2023-10-21 19:19:06 +02:00
2021-05-25 00:36:11 +02:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2024-11-11 23:37:50 +01:00
2024-11-10 22:58:28 +01:00
2024-07-07 00:40:29 +02:00
2024-11-25 23:34:12 +01:00
2024-11-11 22:10:26 +01:00
2024-11-10 22:58:28 +01:00
2024-11-13 21:48:27 +01:00
2023-08-10 09:45:41 +02:00
2024-11-10 22:58:28 +01:00
2023-08-10 09:45:41 +02:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2021-07-10 01:53:39 +02:00
2024-11-01 15:53:05 +00:00
2024-07-07 00:40:29 +02:00
2024-11-18 14:47:40 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2022-06-24 21:24:02 +02:00
2020-11-19 12:50:12 +01:00
2024-11-10 22:58:28 +01:00
2020-11-19 12:50:12 +01:00
2024-01-18 01:00:21 +01:00
2021-02-06 00:58:24 +01:00
2022-11-15 21:01:51 +01:00
2023-08-27 23:50:22 +02:00
2024-07-07 00:39:27 +02:00
2022-02-09 13:00:45 +00:00
2022-11-15 21:01:51 +01:00
2024-07-07 00:40:29 +02:00
2023-03-17 23:23:22 +01:00
2024-02-29 22:16:52 +01:00
2020-11-19 12:50:12 +01:00
2024-07-07 00:40:29 +02:00
2024-11-10 22:58:28 +01:00
2023-07-27 23:31:29 +02:00
2023-08-17 00:55:56 +02:00
2024-07-07 00:40:29 +02:00
2023-10-15 23:01:08 +02:00
2024-07-07 00:40:29 +02:00
2023-10-15 23:17:05 +02:00
2024-07-07 00:40:29 +02:00
2023-07-27 23:31:29 +02:00
2024-11-10 22:58:28 +01:00
2022-08-23 22:27:58 +02:00
2024-06-28 00:24:43 +02:00
2024-12-02 11:34:44 -08:00
2024-07-07 00:40:29 +02:00
2021-04-29 23:03:26 +02:00
2024-08-28 21:54:51 +01:00
2024-11-10 22:58:28 +01:00
2024-06-28 00:34:21 +02:00
2024-11-11 00:06:46 +01:00
2023-07-27 23:32:08 +02:00
2023-08-16 01:32:08 +02:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2020-11-19 12:50:12 +01:00
2024-09-27 08:18:43 -07:00
2020-03-16 11:12:11 +01:00
2024-11-18 14:31:57 +01:00
2023-08-28 00:01:51 +02:00
2024-01-08 01:33:27 +01:00
2024-07-07 00:40:29 +02:00
2023-02-01 09:13:35 +01:00
2024-10-02 17:23:23 -04:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 23:02:43 +01:00
2024-04-17 01:39:35 +02:00
2023-03-21 21:15:10 +01:00
2022-05-18 00:20:39 +02:00
2023-02-09 23:31:46 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2022-12-11 18:14:01 +01:00
2019-11-18 15:23:54 +01:00
2020-11-19 12:50:12 +01:00
2024-11-11 22:00:35 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2023-07-27 23:31:29 +02:00
2024-07-07 00:40:29 +02:00
2021-03-10 11:06:33 +00:00
2024-11-11 11:47:58 +01:00
2024-11-10 22:58:28 +01:00
2022-03-23 19:58:39 +01:00
2022-03-25 11:42:50 +01:00
2024-11-10 22:58:28 +01:00
2023-10-13 12:29:08 +02:00
2023-02-01 09:13:35 +01:00
2023-08-27 23:53:06 +02:00
2024-07-07 00:40:29 +02:00
2024-11-11 22:13:39 +01:00
2024-07-07 00:40:29 +02:00
2024-11-10 22:58:28 +01:00
2023-07-27 23:31:29 +02:00
2023-10-15 22:37:57 +02:00
2024-11-10 22:58:28 +01:00
2021-02-02 14:25:50 +01:00
2022-03-23 19:58:37 +01:00
2024-11-30 11:18:16 -08:00
2020-11-19 12:50:12 +01:00
2024-11-10 22:58:28 +01:00
2023-10-15 22:37:25 +02:00
2020-11-19 12:50:12 +01:00
2024-11-10 22:58:28 +01:00
2024-09-22 01:17:35 +02:00
2024-11-10 22:09:01 +01:00
2022-12-11 20:56:33 +01:00
2020-11-19 12:50:12 +01:00
2022-12-15 23:34:31 +01:00
2020-11-19 12:50:12 +01:00
2023-08-16 01:32:08 +02:00
2024-11-10 22:58:28 +01:00
2024-11-18 12:14:13 +01:00
2024-07-07 00:40:29 +02:00
2023-07-27 23:31:29 +02:00
2024-01-15 22:29:48 +01:00
2024-07-07 00:40:29 +02:00
2024-07-07 00:40:29 +02:00
2023-06-06 23:29:37 +02:00
2024-05-07 23:40:10 +02:00
2024-07-07 00:40:29 +02:00
2024-11-25 23:32:50 +01:00
2024-11-10 22:58:28 +01:00
2023-04-26 11:40:26 +01:00
2024-09-12 00:15:49 +02:00
2024-11-10 22:58:28 +01:00
2021-07-10 01:53:39 +02:00
2024-09-12 00:33:24 +02:00
2024-07-07 00:40:29 +02:00
2024-11-10 22:58:28 +01:00
2022-11-15 21:25:44 +01:00
2024-11-10 22:58:28 +01:00
2023-10-16 16:54:15 +02:00
2024-11-10 23:01:59 +01:00
2020-11-19 12:50:12 +01:00
2020-11-19 12:50:12 +01:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2020-11-19 12:50:12 +01:00
2024-09-12 00:33:33 +02:00
2024-11-10 22:58:28 +01:00
2023-07-27 23:31:29 +02:00
2024-11-10 22:58:28 +01:00
2020-12-03 23:43:23 +01:00
2023-07-27 23:31:29 +02:00
2024-11-10 22:58:28 +01:00
2024-06-28 00:18:55 +02:00
2024-06-28 00:24:43 +02:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2020-11-19 12:50:12 +01:00
2020-11-19 12:50:12 +01:00
2024-11-10 22:58:28 +01:00
2024-07-07 00:40:29 +02:00
2024-11-10 22:58:28 +01:00
2024-11-10 22:58:28 +01:00
2022-11-15 21:01:51 +01:00