diff options
| author | Muchun Song <[email protected]> | 2021-09-08 02:56:15 +0000 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2021-09-08 18:50:24 +0000 |
| commit | 41c961b9013ee9b6d0491f6926df546e37964b1f (patch) | |
| tree | c31916704b7e85b7d69f193983e6cc9763b5c8ac /lib/test_printf.c | |
| parent | mm: in_irq() cleanup (diff) | |
| download | kernel-41c961b9013ee9b6d0491f6926df546e37964b1f.tar.gz kernel-41c961b9013ee9b6d0491f6926df546e37964b1f.zip | |
mm: introduce PAGEFLAGS_MASK to replace ((1UL << NR_PAGEFLAGS) - 1)
Instead of hard-coding ((1UL << NR_PAGEFLAGS) - 1) everywhere, introducing
PAGEFLAGS_MASK to make the code clear to get the page flags.
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Muchun Song <[email protected]>
Reviewed-by: Roman Gushchin <[email protected]>
Acked-by: Johannes Weiner <[email protected]>
Reviewed-by: Shakeel Butt <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Vladimir Davydov <[email protected]>
Cc: Matthew Wilcox (Oracle) <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'lib/test_printf.c')
| -rw-r--r-- | lib/test_printf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c index 8ac71aee46af..ec69953cf80c 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -614,7 +614,7 @@ page_flags_test(int section, int node, int zone, int last_cpupid, bool append = false; int i; - flags &= BIT(NR_PAGEFLAGS) - 1; + flags &= PAGEFLAGS_MASK; if (flags) { page_flags |= flags; snprintf(cmp_buf + size, BUF_SIZE - size, "%s", name); |
