Commit c2c3a60a authored by Miaohe Lin's avatar Miaohe Lin Committed by Andrew Morton

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.comSigned-off-by: default avatarMiaohe Lin <linmiaohe@huawei.com>
Reviewed-by: default avatarMuchun Song <songmuchun@bytedance.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 263b8998
...@@ -4137,7 +4137,7 @@ void __init hugetlb_add_hstate(unsigned int order) ...@@ -4137,7 +4137,7 @@ void __init hugetlb_add_hstate(unsigned int order)
h->next_nid_to_alloc = first_memory_node; h->next_nid_to_alloc = first_memory_node;
h->next_nid_to_free = first_memory_node; h->next_nid_to_free = first_memory_node;
snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB", snprintf(h->name, HSTATE_NAME_LEN, "hugepages-%lukB",
huge_page_size(h)/1024); huge_page_size(h)/SZ_1K);
parsed_hstate = h; parsed_hstate = h;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment