hugetlb_cgroup: use helper for_each_hstate and hstate_index
authorMiaohe Lin <linmiaohe@huawei.com>
Fri, 29 Jul 2022 08:01:06 +0000 (16:01 +0800)
committerAndrew Morton <akpm@linux-foundation.org>
Mon, 12 Sep 2022 03:25:53 +0000 (20:25 -0700)
commitc37213c5eaaf4c9a6249b14b39426285a4ea89c5
tree814f5086c9e332ca747c66c2af51612531ccda29
parent99249387cf0d1e4525887c2292c4249edf0d8eea
hugetlb_cgroup: use helper for_each_hstate and hstate_index

Use helper for_each_hstate and hstate_index to iterate the hstate and get
the hstate index. Minor readability improvement.

Link: https://lkml.kernel.org/r/20220729080106.12752-6-linmiaohe@huawei.com
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Mina Almasry <almasrymina@google.com>
Cc: Mike Kravetz <mike.kravetz@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/hugetlb_cgroup.c