From patchwork Mon Sep 21 16:28:44 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "gregkh@linuxfoundation.org" X-Patchwork-Id: 263629 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=-11.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable 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 49501C43466 for ; Mon, 21 Sep 2020 16:53:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EDEB82223E for ; Mon, 21 Sep 2020 16:53:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600707216; bh=DeR0aKI8WkL4uiBhR9N2qdwDYZpfrYva1bno0IxnhGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=bynGn7NglhMtR8zDFunFf6H9prl4dik2gyEycK87pkbZiuNjMxw8K3nVRN3nPhWhG Yxe8L20cB6kubhqB47MfXQbA8XIzVGvlrEBf4Jt2oFp6c99qlejCXa4uhWu00ZPEih JPjHre5PEiPkv6U8SXgOLTPBAxGKTk1IfeaDqaaY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729612AbgIUQrS (ORCPT ); Mon, 21 Sep 2020 12:47:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:53954 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729760AbgIUQrO (ORCPT ); Mon, 21 Sep 2020 12:47:14 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id BFBA423888; Mon, 21 Sep 2020 16:47:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706834; bh=DeR0aKI8WkL4uiBhR9N2qdwDYZpfrYva1bno0IxnhGI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MInVX8tVNS5Mdx/QJMYiz08GiUyf8BggLfkAowDB0qEmLQr+Ke0cssFL3DMEgusZM 0smD7Nc6bMiZJKatwgkkVdmxMf1KKZq595e8XjjmGor9SRQ45XfPDx58NqQD35Gtrb rl/zjx4uBHpgGG6iQOT3AQLFzb7m4p48AywaltKM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Christophe Leroy , Andrew Morton , Linus Torvalds Subject: [PATCH 5.8 112/118] selftests/vm: fix display of page size in map_hugetlb Date: Mon, 21 Sep 2020 18:28:44 +0200 Message-Id: <20200921162041.591047289@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162036.324813383@linuxfoundation.org> References: <20200921162036.324813383@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Christophe Leroy commit 1ec882fc81e3177faf055877310dbdb0c68eb7db upstream. The displayed size is in bytes while the text says it is in kB. Shift it by 10 to really display kBytes. Fixes: fa7b9a805c79 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb") Signed-off-by: Christophe Leroy Signed-off-by: Andrew Morton Cc: Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu Signed-off-by: Linus Torvalds Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/vm/map_hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/tools/testing/selftests/vm/map_hugetlb.c +++ b/tools/testing/selftests/vm/map_hugetlb.c @@ -83,7 +83,7 @@ int main(int argc, char **argv) } if (shift) - printf("%u kB hugepages\n", 1 << shift); + printf("%u kB hugepages\n", 1 << (shift - 10)); else printf("Default size hugepages\n"); printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20);