From patchwork Tue Feb 23 05:51:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yafang Shao X-Patchwork-Id: 12099927 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57C41C433DB for ; Tue, 23 Feb 2021 05:51:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C1BEE600CD for ; Tue, 23 Feb 2021 05:51:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C1BEE600CD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 2746E6B0005; Tue, 23 Feb 2021 00:51:50 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 225356B0006; Tue, 23 Feb 2021 00:51:50 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 13C156B006E; Tue, 23 Feb 2021 00:51:50 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0096.hostedemail.com [216.40.44.96]) by kanga.kvack.org (Postfix) with ESMTP id F3EFB6B0005 for ; Tue, 23 Feb 2021 00:51:49 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B6646180ACF9A for ; Tue, 23 Feb 2021 05:51:49 +0000 (UTC) X-FDA: 77848461138.07.FBAEB82 Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com [209.85.160.180]) by imf05.hostedemail.com (Postfix) with ESMTP id 47843E0011E6 for ; Tue, 23 Feb 2021 05:51:48 +0000 (UTC) Received: by mail-qt1-f180.google.com with SMTP id f17so11121087qth.7 for ; Mon, 22 Feb 2021 21:51:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SnfatnFhprykbFACP1sY2rHFU+RBjXxSen3CnnKRJiI=; b=iKyoVoG/NdZLFD//p9fdiACY7FaNSXwwS96epc14E+KFYjDTTvGNh+UaDaJ3qWrPTK 2UcwSkXgM7x7nMM/UzWGXZ/v9owWVHEjBxfgYUIEOnnuhzNWd9kHWKwU6uR+rWlCSoox n4ZIVC9mt2Wf9JOZN56jLZBIuHz7m+NikcFJ+LMyuSpa3mh9yQumTZ5+FXrEUNmje0yr 3dbe/+RYlNv9A/Lb4GhhvntG5KHKNNNHFezkTIcm8lV7qLFAO8W063Y5W7TIBzg5RYmc Y8lKgpoi8UlGciE06HFvuTmRlqnM+Ni9vOF4YaDDgV+3M4JO4ipk+5EIrX6GYJMZcVgt nm7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=SnfatnFhprykbFACP1sY2rHFU+RBjXxSen3CnnKRJiI=; b=aNyQbMMCbSWl+JFXL8RDp6YXYsDtUZcXMuEI74t6B+FPDV4i4np0ZufvH+xErw1e5B 8L6NwZfhsxVpiKH6R2kiiqn7l628YZXg9EkS3UIiJhv7urVetKMdBSAhUPWsPzWDj0yH Y2cMhH8tPQcLsqedENP7dyteoJ0FPQXp08IWrKtNuDQICKi5Xzvx6+Br+xz+cocPkBen cntkCoE7FbKdktpu/iArt5+BSRNpmStjfKVvqCBsDj1SUSHhDp0yVSqus7B+/f8mQzg4 6gcaYGu33+LHhwR+5VgrZujTMpw+AMOqafc3o0u+ZRO22SpvucUkOzYwAxwH190ITGYv GzZA== X-Gm-Message-State: AOAM530QZ2isq+7mDLmaUWxll2ljIhKccTRL5jJOl7Dygl0SaCJCbYRt GdfiwnoBIojqIOzbl6HG2ZY= X-Google-Smtp-Source: ABdhPJwctQNEjgjnNy0gm5ehL3c5WewYIr2E+Zw/1PwU70yxbH4GpK0noUnEdrblrIu5SG0nRphZdg== X-Received: by 2002:aed:30a3:: with SMTP id 32mr20689745qtf.130.1614059508521; Mon, 22 Feb 2021 21:51:48 -0800 (PST) Received: from localhost.localdomain ([50.236.19.102]) by smtp.gmail.com with ESMTPSA id o12sm14534218qko.117.2021.02.22.21.51.39 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 22 Feb 2021 21:51:47 -0800 (PST) From: Yafang Shao To: pmladek@suse.com, willy@infradead.org, andriy.shevchenko@linux.intel.com, david@redhat.com, linmiaohe@huawei.com, vbabka@suse.cz, cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, rostedt@goodmis.org, sergey.senozhatsky@gmail.com, joe@perches.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Yafang Shao Subject: [PATCH 1/1] vsprintf: dump full information of page flags in pGp fix Date: Tue, 23 Feb 2021 13:51:24 +0800 Message-Id: <20210223055124.75882-1-laoar.shao@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Stat-Signature: wok95cx84biaegaxpdkjcd8s3d9kpnq5 X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 47843E0011E6 Received-SPF: none (gmail.com>: No applicable sender policy available) receiver=imf05; identity=mailfrom; envelope-from=""; helo=mail-qt1-f180.google.com; client-ip=209.85.160.180 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1614059508-197866 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: The name of the flag should be printed using default_str_spec. There's no difference in the output after this change because the string is printed as-is with both default_dec_spec and default_flag_spec. This patch is a followup of the patchset "mm, vsprintf: dump full information of page flags in pGp" [1] [1]. https://lore.kernel.org/linux-mm/20210215155141.47432-1-laoar.shao@gmail.com/ Signed-off-by: Yafang Shao Cc: Petr Mladek Cc: Matthew Wilcox Cc: Andy Shevchenko Cc: Vlastimil Babka Cc: Miaohe Lin Cc: Joe Perches Cc: David Hildenbrand Reviewed-by: Petr Mladek --- lib/vsprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/vsprintf.c b/lib/vsprintf.c index 533ac5404180..5d034e799c06 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1963,7 +1963,7 @@ char *format_page_flags(char *buf, char *end, unsigned long flags) buf++; } - buf = string(buf, end, p->name, *p->spec); + buf = string(buf, end, p->name, default_str_spec); if (buf < end) *buf = '='; buf++;