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