From mboxrd@z Thu Jan 1 00:00:00 1970 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 7D81DC433F5 for ; Mon, 18 Oct 2021 05:41:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 17FEF610A6 for ; Mon, 18 Oct 2021 05:41:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 17FEF610A6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 9D33F6B006C; Mon, 18 Oct 2021 01:41:30 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 982B86B0071; Mon, 18 Oct 2021 01:41:30 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 871806B0072; Mon, 18 Oct 2021 01:41:30 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0120.hostedemail.com [216.40.44.120]) by kanga.kvack.org (Postfix) with ESMTP id 78C976B006C for ; Mon, 18 Oct 2021 01:41:30 -0400 (EDT) Received: from smtpin37.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 232C8181D2095 for ; Mon, 18 Oct 2021 05:41:30 +0000 (UTC) X-FDA: 78708460740.37.2E34997 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf04.hostedemail.com (Postfix) with ESMTP id CBD7350000AD for ; Mon, 18 Oct 2021 05:41:27 +0000 (UTC) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id E17AF106F; Sun, 17 Oct 2021 22:41:28 -0700 (PDT) Received: from [10.163.74.6] (unknown [10.163.74.6]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id BB5D93F73D; Sun, 17 Oct 2021 22:41:26 -0700 (PDT) Subject: Re: [PATCH 3/5] test_printf: Remove custom appending of '|' To: "Matthew Wilcox (Oracle)" , Yafang Shao Cc: Sergey Senozhatsky , Petr Mladek , linux-mm@kvack.org, Vlastimil Babka , Rasmus Villemoes References: <20211012182647.1605095-1-willy@infradead.org> <20211012182647.1605095-4-willy@infradead.org> From: Anshuman Khandual Message-ID: <04b4254d-6006-10f2-9790-b89997e985e4@arm.com> Date: Mon, 18 Oct 2021 11:11:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20211012182647.1605095-4-willy@infradead.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: CBD7350000AD Authentication-Results: imf04.hostedemail.com; dkim=none; spf=pass (imf04.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com; dmarc=pass (policy=none) header.from=arm.com X-Stat-Signature: dp91fptij5x9jtkjxm7k5kkws8cnaxqm X-Rspamd-Server: rspam05 X-HE-Tag: 1634535687-426134 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: On 10/12/21 11:56 PM, Matthew Wilcox (Oracle) wrote: > 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) > --- > 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 f744b0498672..60cdf4ba991e 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++) { > Reviewed-by: Anshuman Khandual