Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/vm: fix display of page size in map_hugetlb

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 <christophe.leroy@csgroup.eu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: <stable@vger.kernel.org>
Link: https://lkml.kernel.org/r/e27481224564a93d14106e750de31189deaa8bc8.1598861977.git.christophe.leroy@csgroup.eu
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Christophe Leroy and committed by
Linus Torvalds
1ec882fc ec0abae6

+1 -1
+1 -1
tools/testing/selftests/vm/map_hugetlb.c
··· 83 83 } 84 84 85 85 if (shift) 86 - printf("%u kB hugepages\n", 1 << shift); 86 + printf("%u kB hugepages\n", 1 << (shift - 10)); 87 87 else 88 88 printf("Default size hugepages\n"); 89 89 printf("Mapping %lu Mbytes\n", (unsigned long)length >> 20);