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