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