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