[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADnq5_MyyomPwhQ6DW0GsfS8XNogLECM-h3-8AODYr1OTrm_ug@mail.gmail.com>
Date: Tue, 18 Mar 2025 09:18:28 -0400
From: Alex Deucher <alexdeucher@...il.com>
To: feng.wei8@....com.cn
Cc: alexander.deucher@....com, christian.koenig@....com, airlied@...il.com,
simona@...ll.ch, amd-gfx@...ts.freedesktop.org,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drm/radeon/uvd: Replace nested max() with single max3()
Applied. Thanks!
Alex
On Tue, Mar 18, 2025 at 2:18 AM <feng.wei8@....com.cn> wrote:
>
> From: FengWei <feng.wei8@....com.cn>
>
> Use max3() macro instead of nesting max() to simplify the return
> statement.
>
> Signed-off-by: FengWei <feng.wei8@....com.cn>
> ---
> drivers/gpu/drm/radeon/radeon_uvd.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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;
> --
> 2.25.1
Powered by blists - more mailing lists