mm/hugetlb.c: use helper macro K()
authorZhangPeng <zhangpeng362@huawei.com>
Fri, 4 Aug 2023 01:25:59 +0000 (09:25 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 21 Aug 2023 20:37:45 +0000 (13:37 -0700)
Use helper macro K() to improve code readability.  No functional
modification involved.

Link: https://lkml.kernel.org/r/20230804012559.2617515-8-zhangpeng362@huawei.com
Signed-off-by: ZhangPeng <zhangpeng362@huawei.com>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: Nanyong Sun <sunnanyong@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb.c

index 102f83bd3a9f4a09e65f7ff3a1bfc6c2cb6ab5b2..851457af0869cfe33612a3dc24548a3b1646c7a5 100644 (file)
@@ -4748,7 +4748,7 @@ void hugetlb_show_meminfo_node(int nid)
 void hugetlb_report_usage(struct seq_file *m, struct mm_struct *mm)
 {
        seq_printf(m, "HugetlbPages:\t%8lu kB\n",
-                  atomic_long_read(&mm->hugetlb_usage) << (PAGE_SHIFT - 10));
+                  K(atomic_long_read(&mm->hugetlb_usage)));
 }
 
 /* Return the number pages of memory we physically have, in PAGE_SIZE units. */