Peter Zijlstra
cdd30ebb1b
module: Convert symbol namespace to string literal
Clean up the existing export namespace code along the same lines of
commit 33def8498fdd ("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-26 11:29:09 +00:00
2024-06-10 12:49:03 +01:00
2024-11-06 14:15:39 +00:00
2024-11-06 14:15:39 +00:00
2024-10-07 14:53:15 +01:00
2024-06-10 12:49:05 +01:00
2022-12-29 13:22:04 +00:00
2024-04-15 10:17:25 +09:00
2024-09-30 01:11:56 +02:00
2023-08-14 13:10:48 +01:00
2024-11-11 11:47:12 +00:00
2024-09-30 01:12:23 +02:00
2024-04-30 23:57:26 +09:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-31 18:51:26 +00:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-01-23 13:28:03 +00:00
2022-10-18 19:16:53 +01:00
2024-09-30 01:12:23 +02:00
2023-07-11 13:41:20 +01:00
2024-07-29 01:19:52 +01:00
2024-09-30 01:12:23 +02:00
2024-07-03 16:44:22 +02:00
2024-09-30 01:12:23 +02:00
2024-08-19 13:11:18 +01:00
2024-10-07 14:53:15 +01:00
2024-09-30 01:12:23 +02:00
2023-09-11 01:31:59 +01:00
2024-02-08 11:54:50 +00:00
2024-02-08 11:54:50 +00:00
2024-09-30 01:12:04 +02:00
2023-08-07 14:38:28 +01:00
2024-09-30 01:12:23 +02:00
2024-12-02 11:34:44 -08:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53: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-12-02 11:34:44 -08:00
2024-12-02 11:34:44 -08:00
2024-05-03 11:09:24 +09:00
2024-09-30 01:12:23 +02:00
2023-08-14 13:10:51 +01:00
2023-08-14 13:10:52 +01:00
2024-06-10 12:49:05 +01:00
2024-03-28 21:09:46 +00:00
2024-11-20 12:23:06 -08:00
2024-09-30 01:12:23 +02:00
2024-06-10 12:49:05 +01:00
2023-07-25 17:40:28 +01:00
2024-10-01 12:16:13 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-22 20:49:02 +01:00
2024-07-29 01:19:53 +01:00
2023-09-27 17:06:36 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:21 +02:00
2024-09-30 01:12:23 +02:00
2024-11-21 13:14:33 +00:00
2024-06-10 12:48:59 +01:00
2024-10-09 14:41:00 +01:00
2024-10-09 14:41:00 +01:00
2024-10-09 14:41:00 +01:00
2024-10-09 14:41:00 +01:00
2024-09-30 01:12:23 +02:00
2023-08-14 13:11:05 +01:00
2024-09-30 01:12:23 +02:00
2024-12-02 11:34:44 -08:00
2024-07-03 16:44:22 +02: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
2023-07-31 15:57:09 +01:00
2024-03-28 13:58:40 +00:00
2023-09-11 01:31:31 +01:00
2024-10-02 09:44:56 +03:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:21 +02:00
2024-09-30 01:12:23 +02:00
2023-09-11 01:31:35 +01:00
2024-09-30 01:12:23 +02:00
2024-03-25 15:03:02 +00:00
2024-09-30 01:12:23 +02:00
2024-11-22 17:06:59 -08:00
2024-07-09 17:42:33 +01:00
2024-11-22 17:06:59 -08:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53:15 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53:15 +01:00
2024-06-10 12:49:01 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:21 +02:00
2024-09-30 01:12:23 +02:00
2024-05-03 11:11:36 +09: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-08-22 13:34:05 +01:00
2024-11-04 19:18:19 +00:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-11-01 14:48:53 +00:00
2023-08-21 14:29:28 +01:00
2024-11-19 11:38:43 +00:00
2024-10-10 10:49:17 +01:00
2024-10-07 14:53:15 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53:15 +01:00
2023-08-21 14:29:33 +01:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53:15 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 22:43:40 +01:00
2024-09-10 12:41:38 +01:00
2024-09-10 12:41:37 +01:00
2024-09-30 01:12:23 +02:00
2023-12-11 12:54:53 +00:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-10-10 15:22:37 +01:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-11-01 14:48:52 +00:00
2024-11-04 19:18:19 +00:00
2022-02-09 13:00:45 +00:00
2024-09-30 01:12:23 +02:00
2024-10-07 14:53:15 +01:00
2024-08-28 22:22:24 +01:00
2024-10-02 17:23:23 -04:00
2024-09-30 01:12:23 +02:00
2024-04-30 23:57:32 +09:00
2024-09-30 01:12:23 +02:00
2024-09-30 01:12:23 +02:00
2024-11-01 14:48:54 +00:00
2024-11-26 11:29:15 +00:00
2024-09-27 08:18:43 -07:00