]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
drm/radeon: replace min/max nesting with clamp()
authorXichao Zhao <zhao.xichao@vivo.com>
Tue, 12 Aug 2025 03:16:03 +0000 (11:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Aug 2025 17:03:21 +0000 (13:03 -0400)
commit3e03525ce15cb9fc633b3d0266866020e22ce5e6
treefcc1db98f25cc6acc759dca9d7272c086eade0a2
parentf101c13a8720c73e67f8f9d511fbbeda95bcedb1
drm/radeon: replace min/max nesting with clamp()

The clamp() macro explicitly expresses the intent of constraining
a value within bounds.Therefore, replacing min(max(a, b), c) and
max(min(a,b),c) with clamp(val, lo, hi) can improve code readability.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/radeon/radeon_display.c