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