]> www.infradead.org Git - users/hch/misc.git/commitdiff
drm/radeon/uvd: Replace nested max() with single max3()
authorFengWei <feng.wei8@zte.com.cn>
Mon, 17 Mar 2025 02:57:45 +0000 (10:57 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Mar 2025 19:51:40 +0000 (15:51 -0400)
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>
drivers/gpu/drm/radeon/radeon_uvd.c

index 058a1c8451b2d946b4a6a6ce7790d7f84815c843..ded5747a58d138a1d61ea4ae08bb691e95a39c0c 100644 (file)
@@ -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;