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