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