From: Matthew Wilcox (Oracle) Date: Tue, 19 Oct 2021 14:26:19 +0000 (+0100) Subject: test_printf: Remove custom appending of '|' X-Git-Tag: v5.16-rc1~155^2^2~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5b358b0de963f822226bfee916fb53c80bae4000;p=thirdparty%2Fkernel%2Fstable.git test_printf: Remove custom appending of '|' Instead of having an ifdef to decide whether to print a |, use the 'append' functionality of the main loop to print it. Signed-off-by: Matthew Wilcox (Oracle) Reviewed-by: Yafang Shao Reviewed-by: Petr Mladek Reviewed-by: Anshuman Khandual Signed-off-by: Petr Mladek Link: https://lore.kernel.org/r/20211019142621.2810043-4-willy@infradead.org --- diff --git a/lib/test_printf.c b/lib/test_printf.c index 4531063afd453..ec584196cb99f 100644 --- a/lib/test_printf.c +++ b/lib/test_printf.c @@ -616,12 +616,7 @@ page_flags_test(int section, int node, int zone, int last_cpupid, if (flags & PAGEFLAGS_MASK) { snprintf(cmp_buf + size, BUF_SIZE - size, "%s", name); size = strlen(cmp_buf); -#if SECTIONS_WIDTH || NODES_WIDTH || ZONES_WIDTH || \ - LAST_CPUPID_WIDTH || KASAN_TAG_WIDTH - /* Other information also included in page flags */ - snprintf(cmp_buf + size, BUF_SIZE - size, "|"); - size = strlen(cmp_buf); -#endif + append = true; } for (i = 0; i < ARRAY_SIZE(pft); i++) {