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-11-25 13:41:00 -06:00
2024-11-18 17:18:19 +00:00
2024-11-25 13:41:00 -06:00
2024-07-22 14:02:19 -07:00
2024-12-02 11:34:44 -08:00
2024-11-26 18:05:44 -08:00
2024-06-10 15:03:30 -05:00
2024-06-04 12:10:05 -05:00
2024-09-23 12:47:06 -07:00
2024-11-25 13:40:54 -06:00
2024-11-07 07:10:02 -06:00
2024-10-13 10:55:39 -05:00
2024-10-10 17:44:57 -05:00
2024-09-19 14:24:00 -05:00
2024-10-10 17:44:57 -05:00
2024-01-29 17:01:31 -06:00
2024-11-25 13:40:55 -06:00
2024-11-25 13:40:55 -06:00
2024-03-05 16:08:43 -06:00
2024-09-06 11:37:24 -05:00
2024-11-15 11:17:52 -06:00
2024-11-21 16:01:04 +00:00
2024-11-05 14:00:28 +01:00
2024-08-27 15:48:35 +02:00
2024-09-10 19:52:30 -05:00
2024-08-23 12:46:22 -05:00
2024-06-11 17:08:14 -05:00
2024-07-08 08:35:35 +00:00
2024-07-08 08:35:35 +00:00
2024-11-29 11:43:29 -08:00
2024-11-26 18:05:44 -08:00
2024-11-25 13:40:55 -06:00
2024-11-26 18:05:44 -08:00
2024-11-26 18:05:44 -08:00
2024-11-30 11:41:25 -06:00
2023-09-28 16:49:44 -05:00
2024-10-18 18:41:11 -05:00
2024-10-10 17:44:57 -05:00
2024-11-25 13:41:00 -06:00
2023-08-25 08:15:13 -05:00
2024-10-02 16:23:10 -05:00
2023-10-24 16:55:45 -05:00
2023-11-02 14:05:18 -10:00
2024-11-05 14:00:28 +01:00
2023-07-31 17:54:27 +02:00