mm/page_alloc: use clamp() to simplify code
authorWang ShaoBo <bobo.shaobowang@huawei.com>
Fri, 5 Nov 2021 20:40:55 +0000 (13:40 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Nov 2021 20:30:38 +0000 (13:30 -0700)
commit59d336bdf6931a6a8c2ba41e533267d1cc799fc9
tree355c713c16f9806f25317b14e2d195b4f1fb3277
parent9c25cbfcb38462803a3d68f5d88e66a587f5f045
mm/page_alloc: use clamp() to simplify code

This patch uses clamp() to simplify code in init_per_zone_wmark_min().

Link: https://lkml.kernel.org/r/20211021034830.1049150-1-bobo.shaobowang@huawei.com
Signed-off-by: Wang ShaoBo <bobo.shaobowang@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Li Bin <huawei.libin@huawei.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/page_alloc.c