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