From patchwork Tue Oct 12 18:26:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthew Wilcox X-Patchwork-Id: 12553491 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6734AC433EF for ; Tue, 12 Oct 2021 18:32:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id D088C60EE5 for ; Tue, 12 Oct 2021 18:32:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D088C60EE5 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 63222900003; Tue, 12 Oct 2021 14:32:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 5E239900002; Tue, 12 Oct 2021 14:32:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4AAC5900003; Tue, 12 Oct 2021 14:32:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0118.hostedemail.com [216.40.44.118]) by kanga.kvack.org (Postfix) with ESMTP id 3ABB3900002 for ; Tue, 12 Oct 2021 14:32:09 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id E7C152DD8F for ; Tue, 12 Oct 2021 18:32:08 +0000 (UTC) X-FDA: 78688629936.37.8F1A92B Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf12.hostedemail.com (Postfix) with ESMTP id A98D010000B6 for ; Tue, 12 Oct 2021 18:32:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=nsogbl0ugs0YiRL5cE9BFTBfHzDN0SwJQRRUzFF+/PI=; b=gjJYR6ER03bYtSK2ha+71VPaNw w/zLKepNX+PC9csYSFQ4kdmnOKZ3hlQk2YhtL1a4hvhvVxvtPcjxC7UIxcyJbSAH04gtAHCkMbV2t r3udZdCYMlcC6hYBXSpJwnOHyQgaiSYRWI7dk1litpJ/Mf9WsGyxQ5GJDv82IcBwdLZ0tRKFl+gmi 9vuEOFW+KzEfVvduhKgX5EIs2TBrB8FDlruY1F8TUMZBAbPyCffD+TkEKDFcqSM+D/yqHtM0p8Gge TVhZYMZGMTKexU8eFOdLBLeQfMqe0bOWH2ka6UJecpGxDvYbQFRJQiHDSfMslOwlYJDp/SVayPqhT jeXvld3Q==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1maMW8-006jiq-Kk; Tue, 12 Oct 2021 18:29:14 +0000 From: "Matthew Wilcox (Oracle)" To: Yafang Shao Cc: "Matthew Wilcox (Oracle)" , Sergey Senozhatsky , Petr Mladek , linux-mm@kvack.org, Vlastimil Babka , Rasmus Villemoes Subject: [PATCH 2/5] test_printf: Assign all flags to page_flags Date: Tue, 12 Oct 2021 19:26:44 +0100 Message-Id: <20211012182647.1605095-3-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211012182647.1605095-1-willy@infradead.org> References: <20211012182647.1605095-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: A98D010000B6 X-Stat-Signature: biwtsc17y97f4exqp7scn5sr7paprj1r Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=gjJYR6ER; dmarc=none; spf=none (imf12.hostedemail.com: domain of willy@infradead.org has no SPF policy when checking 90.155.50.34) smtp.mailfrom=willy@infradead.org X-HE-Tag: 1634063528-136627 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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) Reviewed-by: Yafang Shao Reviewed-by: Petr Mladek --- 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 || \