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