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