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