Thread (26 messages) 26 messages, 6 authors, 2021-10-27
STALE1696d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 2/5] test_printf: Assign all flags to page_flags

From: "Matthew Wilcox (Oracle)" <willy@infradead.org>
Date: 2021-10-12 18:32:10
Subsystem: library code, the rest · Maintainers: Andrew Morton, Linus Torvalds

Even unknown flags should be passed to %pGp so that we can test what it
does with them (today: nothing).

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
 lib/test_printf.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/lib/test_printf.c b/lib/test_printf.c
index a52c1c3a55ba..f744b0498672 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -608,14 +608,12 @@ page_flags_test(int section, int node, int zone, int last_cpupid,
 		int kasan_tag, int flags, const char *name, char *cmp_buf)
 {
 	unsigned long values[] = {section, node, zone, last_cpupid, kasan_tag};
-	unsigned long page_flags = 0;
+	unsigned long page_flags = flags;
 	unsigned long size = 0;
 	bool append = false;
 	int i;
 
-	flags &= PAGEFLAGS_MASK;
-	if (flags) {
-		page_flags |= flags;
+	if (flags & PAGEFLAGS_MASK) {
 		snprintf(cmp_buf + size, BUF_SIZE - size, "%s", name);
 		size = strlen(cmp_buf);
 #if SECTIONS_WIDTH || NODES_WIDTH || ZONES_WIDTH || \
-- 
2.32.0

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help