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