Skip to content

Commit d11304e

Browse files
chleroygregkh
authored andcommitted
selftests/vm: fix display of page size in map_hugetlb
commit 1ec882f upstream. The displayed size is in bytes while the text says it is in kB. Shift it by 10 to really display kBytes. Fixes: fa7b9a8 ("tools/selftest/vm: allow choosing mem size and page size in map_hugetlb") Signed-off-by: Christophe Leroy <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Cc: <[email protected]> Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu Signed-off-by: Linus Torvalds <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 685e3d1 commit d11304e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/vm/map_hugetlb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ int main(int argc, char **argv)
8383
}
8484

8585
if (shift)
86-
printf("%u kB hugepages\n", 1 << shift);
86+
printf("%u kB hugepages\n", 1 << (shift - 10));
8787
else
8888
printf("Default size hugepages\n");
8989
printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20);

0 commit comments

Comments
 (0)