From: Vasily Averin <vvs@openvz.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: kernel@openvz.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, Steven Rostedt <rostedt@goodmis.org>
Subject: [PATCH mm-stable] cleanup for "tracing: incorrect gfp_t conversion"
Date: Tue, 17 May 2022 09:58:14 +0300 [thread overview]
Message-ID: <6f811e19-41c6-f3e8-fca6-23a19a62e313@openvz.org> (raw)
This patch re-defines __def_gfpflag_names array according to
akpm@, willy@ and Joe Perches recommendations.
Fixes: fe573327ffb1 ("tracing: incorrect gfp_t conversion")
Signed-off-by: Vasily Averin <vvs@openvz.org>
---
include/trace/events/mmflags.h | 84 +++++++++++++++++-----------------
1 file changed, 43 insertions(+), 41 deletions(-)
diff --git a/include/trace/events/mmflags.h b/include/trace/events/mmflags.h
index fcb1ffb2cc8d..e87cb2b80ed3 100644
--- a/include/trace/events/mmflags.h
+++ b/include/trace/events/mmflags.h
@@ -13,49 +13,51 @@
* Thus most bits set go first.
*/
-#define __def_gfpflag_names \
- {(__force unsigned long)GFP_TRANSHUGE, "GFP_TRANSHUGE"}, \
- {(__force unsigned long)GFP_TRANSHUGE_LIGHT, "GFP_TRANSHUGE_LIGHT"}, \
- {(__force unsigned long)GFP_HIGHUSER_MOVABLE, "GFP_HIGHUSER_MOVABLE"},\
- {(__force unsigned long)GFP_HIGHUSER, "GFP_HIGHUSER"}, \
- {(__force unsigned long)GFP_USER, "GFP_USER"}, \
- {(__force unsigned long)GFP_KERNEL_ACCOUNT, "GFP_KERNEL_ACCOUNT"}, \
- {(__force unsigned long)GFP_KERNEL, "GFP_KERNEL"}, \
- {(__force unsigned long)GFP_NOFS, "GFP_NOFS"}, \
- {(__force unsigned long)GFP_ATOMIC, "GFP_ATOMIC"}, \
- {(__force unsigned long)GFP_NOIO, "GFP_NOIO"}, \
- {(__force unsigned long)GFP_NOWAIT, "GFP_NOWAIT"}, \
- {(__force unsigned long)GFP_DMA, "GFP_DMA"}, \
- {(__force unsigned long)__GFP_HIGHMEM, "__GFP_HIGHMEM"}, \
- {(__force unsigned long)GFP_DMA32, "GFP_DMA32"}, \
- {(__force unsigned long)__GFP_HIGH, "__GFP_HIGH"}, \
- {(__force unsigned long)__GFP_ATOMIC, "__GFP_ATOMIC"}, \
- {(__force unsigned long)__GFP_IO, "__GFP_IO"}, \
- {(__force unsigned long)__GFP_FS, "__GFP_FS"}, \
- {(__force unsigned long)__GFP_NOWARN, "__GFP_NOWARN"}, \
- {(__force unsigned long)__GFP_RETRY_MAYFAIL, "__GFP_RETRY_MAYFAIL"}, \
- {(__force unsigned long)__GFP_NOFAIL, "__GFP_NOFAIL"}, \
- {(__force unsigned long)__GFP_NORETRY, "__GFP_NORETRY"}, \
- {(__force unsigned long)__GFP_COMP, "__GFP_COMP"}, \
- {(__force unsigned long)__GFP_ZERO, "__GFP_ZERO"}, \
- {(__force unsigned long)__GFP_NOMEMALLOC, "__GFP_NOMEMALLOC"}, \
- {(__force unsigned long)__GFP_MEMALLOC, "__GFP_MEMALLOC"}, \
- {(__force unsigned long)__GFP_HARDWALL, "__GFP_HARDWALL"}, \
- {(__force unsigned long)__GFP_THISNODE, "__GFP_THISNODE"}, \
- {(__force unsigned long)__GFP_RECLAIMABLE, "__GFP_RECLAIMABLE"}, \
- {(__force unsigned long)__GFP_MOVABLE, "__GFP_MOVABLE"}, \
- {(__force unsigned long)__GFP_ACCOUNT, "__GFP_ACCOUNT"}, \
- {(__force unsigned long)__GFP_WRITE, "__GFP_WRITE"}, \
- {(__force unsigned long)__GFP_RECLAIM, "__GFP_RECLAIM"}, \
- {(__force unsigned long)__GFP_DIRECT_RECLAIM, "__GFP_DIRECT_RECLAIM"},\
- {(__force unsigned long)__GFP_KSWAPD_RECLAIM, "__GFP_KSWAPD_RECLAIM"},\
- {(__force unsigned long)__GFP_ZEROTAGS, "__GFP_ZEROTAGS"} \
+#define gfpflag_string(flag) {(__force unsigned long)flag, #flag}
+
+#define __def_gfpflag_names \
+ gfpflag_string(GFP_TRANSHUGE), \
+ gfpflag_string(GFP_TRANSHUGE_LIGHT), \
+ gfpflag_string(GFP_HIGHUSER_MOVABLE), \
+ gfpflag_string(GFP_HIGHUSER), \
+ gfpflag_string(GFP_USER), \
+ gfpflag_string(GFP_KERNEL_ACCOUNT), \
+ gfpflag_string(GFP_KERNEL), \
+ gfpflag_string(GFP_NOFS), \
+ gfpflag_string(GFP_ATOMIC), \
+ gfpflag_string(GFP_NOIO), \
+ gfpflag_string(GFP_NOWAIT), \
+ gfpflag_string(GFP_DMA), \
+ gfpflag_string(__GFP_HIGHMEM), \
+ gfpflag_string(GFP_DMA32), \
+ gfpflag_string(__GFP_HIGH), \
+ gfpflag_string(__GFP_ATOMIC), \
+ gfpflag_string(__GFP_IO), \
+ gfpflag_string(__GFP_FS), \
+ gfpflag_string(__GFP_NOWARN), \
+ gfpflag_string(__GFP_RETRY_MAYFAIL), \
+ gfpflag_string(__GFP_NOFAIL), \
+ gfpflag_string(__GFP_NORETRY), \
+ gfpflag_string(__GFP_COMP), \
+ gfpflag_string(__GFP_ZERO), \
+ gfpflag_string(__GFP_NOMEMALLOC), \
+ gfpflag_string(__GFP_MEMALLOC), \
+ gfpflag_string(__GFP_HARDWALL), \
+ gfpflag_string(__GFP_THISNODE), \
+ gfpflag_string(__GFP_RECLAIMABLE), \
+ gfpflag_string(__GFP_MOVABLE), \
+ gfpflag_string(__GFP_ACCOUNT), \
+ gfpflag_string(__GFP_WRITE), \
+ gfpflag_string(__GFP_RECLAIM), \
+ gfpflag_string(__GFP_DIRECT_RECLAIM), \
+ gfpflag_string(__GFP_KSWAPD_RECLAIM), \
+ gfpflag_string(__GFP_ZEROTAGS)
#ifdef CONFIG_KASAN_HW_TAGS
-#define __def_gfpflag_names_kasan , \
- {(__force unsigned long)__GFP_SKIP_ZERO, "__GFP_SKIP_ZERO"}, \
- {(__force unsigned long)__GFP_SKIP_KASAN_POISON, "__GFP_SKIP_KASAN_POISON"}, \
- {(__force unsigned long)__GFP_SKIP_KASAN_UNPOISON, "__GFP_SKIP_KASAN_UNPOISON"}
+#define __def_gfpflag_names_kasan , \
+ gfpflag_string(__GFP_SKIP_ZERO), \
+ gfpflag_string(__GFP_SKIP_KASAN_POISON), \
+ gfpflag_string(__GFP_SKIP_KASAN_UNPOISON)
#else
#define __def_gfpflag_names_kasan
#endif
--
2.31.1
reply other threads:[~2022-05-17 6:58 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6f811e19-41c6-f3e8-fca6-23a19a62e313@openvz.org \
--to=vvs@openvz.org \
--cc=20220516135537.8458fe08464d97bb45684252@linux-foundation.org \
--cc=akpm@linux-foundation.org \
--cc=kernel@openvz.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.