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