]> Gentwo Git Trees - linux/.git/commit
drm/amd/display: replace min/max nesting with clamp()
authorXichao Zhao <zhao.xichao@vivo.com>
Fri, 8 Aug 2025 02:52:09 +0000 (10:52 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 18 Aug 2025 21:01:32 +0000 (17:01 -0400)
commit27b16364ea126dc74105f151e9f64ac9e06eb268
tree376dc72a810a09f68d624e5c1197ed405768d231
parent5599b214c4afcb4bfe213e67336ce8e8dbb0d5ab
drm/amd/display: 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) with
clamp(val, lo, hi) can improve code readability.

Signed-off-by: Xichao Zhao <zhao.xichao@vivo.com>
Reviewed-by: Alex Hung <alex.hung@amd.com>
Tested-by: Dan Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dml/dcn301/dcn301_fpu.c