From patchwork Tue Oct 19 14:26:19 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Matthew Wilcox (Oracle)" X-Patchwork-Id: 12570075 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 5FDF3C433F5 for ; Tue, 19 Oct 2021 14:32:05 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EDD376112D for ; Tue, 19 Oct 2021 14:32:04 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EDD376112D 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 7D0A26B006C; Tue, 19 Oct 2021 10:32:04 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 77EB66B0071; Tue, 19 Oct 2021 10:32:04 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6463B900002; Tue, 19 Oct 2021 10:32:04 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0004.hostedemail.com [216.40.44.4]) by kanga.kvack.org (Postfix) with ESMTP id 53E426B006C for ; Tue, 19 Oct 2021 10:32:04 -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 EADCA31E61 for ; Tue, 19 Oct 2021 14:32:03 +0000 (UTC) X-FDA: 78713426526.37.A8B4EE4 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf01.hostedemail.com (Postfix) with ESMTP id 9A93250824FD for ; Tue, 19 Oct 2021 14:31:58 +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=ydhR3UpARa1cfwyzU0eenF7PRdg/8ED7cq8uYIOGV7o=; b=NX87jcQjPK9wKj7Y0YRBbWVBfm yaSsyX/vjHlFRVXvwLBmN3PgOC+rdneMyZAyh84P+QwnpfERNuiWgoQKZlHpXrHb0tiyjCMhvGBk8 e6ZT/PX3SAFSFnFnMQWTDtbwGlI7/OtgYgGCtDgYgDPlYXbUCBsFwSYydToyBfG8kD7WnILOazOHV bASglCVoQg+6ha0ru7TjG3c3vXnb7Qs1fxYwELA3gyK0+ovFP5KxwQbbMDNOQ5fdbBc03fLO0H2HV W2oFQdGGx77TyJMIH9uYETcH8XRPMWiXjutZdEMHh7FuqoNxhSutn9GXlU/chZWlpZ1JkwFLNIso8 cR8oxITw==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mcq7K-00Bn93-TJ; Tue, 19 Oct 2021 14:29:42 +0000 From: "Matthew Wilcox (Oracle)" To: Yafang Shao Cc: "Matthew Wilcox (Oracle)" , Sergey Senozhatsky , Petr Mladek , linux-mm@kvack.org, Vlastimil Babka , Rasmus Villemoes , Anshuman Khandual Subject: [PATCH v2 3/5] test_printf: Remove custom appending of '|' Date: Tue, 19 Oct 2021 15:26:19 +0100 Message-Id: <20211019142621.2810043-4-willy@infradead.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20211019142621.2810043-1-willy@infradead.org> References: <20211019142621.2810043-1-willy@infradead.org> MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 9A93250824FD X-Stat-Signature: 8rni7gieatg6xwfzapco379orxw3y4uy Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=infradead.org header.s=casper.20170209 header.b=NX87jcQj; dmarc=none; spf=none (imf01.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: 1634653918-911814 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: 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 --- lib/test_printf.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/test_printf.c b/lib/test_printf.c index 4531063afd45..ec584196cb99 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++) {