]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/nouveau/volt: use clamp() in nvkm_volt_map()
authorLi Zetao <lizetao1@huawei.com>
Sat, 31 Aug 2024 01:28:03 +0000 (09:28 +0800)
committerLyude Paul <lyude@redhat.com>
Wed, 4 Sep 2024 19:21:43 +0000 (15:21 -0400)
commitc6430a8eb08d73f79a0f6cd8dbbc7e71037faac0
tree40502e038a29496e9105ae1f72a39b9822d13541
parentbf7835facc09569eb038db7cfe42590d50b73567
drm/nouveau/volt: use clamp() in nvkm_volt_map()

When it needs to get a value within a certain interval, using clamp()
makes the code easier to understand than min(max()).

Reviewed-by: Lyude Paul <lyude@redhat.com>
Signed-off-by: Li Zetao <lizetao1@huawei.com>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240831012803.3950100-4-lizetao1@huawei.com
drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c