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