mirror of
https://github.com/torvalds/linux
synced 2024-09-29 16:00:27 +00:00
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>
This commit is contained in:
parent
263b899802
commit
c2c3a60a85
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue