aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorFengWei <feng.wei8@zte.com.cn>2025-03-17 10:57:45 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-03-19 15:51:40 -0400
commit5199e8ac07f0d5f2013afc05ffc7781b45b3ba12 (patch)
tree6b767ea4d45281ccd7e7f5c96ad58d9ed2f71abe
parentdrm/amdgpu: grab an additional reference on the gang fence v2 (diff)
downloadwireguard-linux-5199e8ac07f0d5f2013afc05ffc7781b45b3ba12.tar.xz
wireguard-linux-5199e8ac07f0d5f2013afc05ffc7781b45b3ba12.zip
drm/radeon/uvd: Replace nested max() with single max3()
Use max3() macro instead of nesting max() to simplify the return statement. Signed-off-by: FengWei <feng.wei8@zte.com.cn> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/radeon/radeon_uvd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_uvd.c b/drivers/gpu/drm/radeon/radeon_uvd.c
index 058a1c8451b2..ded5747a58d1 100644
--- a/drivers/gpu/drm/radeon/radeon_uvd.c
+++ b/drivers/gpu/drm/radeon/radeon_uvd.c
@@ -961,7 +961,7 @@ int radeon_uvd_calc_upll_dividers(struct radeon_device *rdev,
unsigned optimal_score = ~0;
/* loop through vco from low to high */
- vco_min = max(max(vco_min, vclk), dclk);
+ vco_min = max3(vco_min, vclk, dclk);
for (vco_freq = vco_min; vco_freq <= vco_max; vco_freq += 100) {
uint64_t fb_div = (uint64_t)vco_freq * fb_factor;