[PATCH -next -v2 0/3] drm: use clamp() instead of min(max())

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

When it needs to get the value of a certain interval [min, max],
it is easier to understand using clamp(x, min, max) instead of
min(max(x, min), max). What needs to be determined is that min
should be smaller than max.

v1 -> v2: Change the title prefix of patch 3 to drm/nouveau/volt
v1: https://lore.kernel.org/all/20240830012216.603623-1-lizetao1@xxxxxxxxxx/

Li Zetao (3):
  drm/amd: use clamp() in amdgpu_pll_get_fb_ref_div()
  drm/amdgpu: use clamp() in amdgpu_vm_adjust_size()
  drm/nouveau/volt: use clamp() in nvkm_volt_map()

 drivers/gpu/drm/amd/amdgpu/amdgpu_pll.c         | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c          | 2 +-
 drivers/gpu/drm/nouveau/nvkm/subdev/volt/base.c | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.34.1




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux