summaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
authorMiaohe Lin <linmiaohe@huawei.com>2022-09-01 14:00:22 +0200
committerAndrew Morton <akpm@linux-foundation.org>2022-09-12 05:26:08 +0200
commitc2c3a60a857bfeb154a97ee7e430fc8609c57979 (patch)
tree1eca61c4ceaf521a5af72805523897f35d034048 /mm/hugetlb.c
parenthugetlb: make hugetlb_cma_check() static (diff)
downloadlinux-c2c3a60a857bfeb154a97ee7e430fc8609c57979.tar.xz
linux-c2c3a60a857bfeb154a97ee7e430fc8609c57979.zip
hugetlb: Use helper macro SZ_1K
Use helper macro SZ_1K to do the size conversion to make code more consistent in this file. Minor readability improvement. Link: https://lkml.kernel.org/r/20220901120030.63318-3-linmiaohe@huawei.com Signed-off-by: Miaohe Lin <linmiaohe@huawei.com> Reviewed-by: Muchun Song <songmuchun@bytedance.com> Cc: Mike Kravetz <mike.kravetz@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index 6a2e81f37211..cebaa5d28b52 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -4137,7 +4137,7 @@ void __init hugetlb_add_hstate(unsigned int order)
h->next_nid_to_alloc = first_memory_node;
h->next_nid_to_free = first_memory_node;
snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
- huge_page_size(h)/1024);
+ huge_page_size(h)/SZ_1K);
parsed_hstate = h;
}