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