[PATCH 04/12] drm/amdgpu: remove dead code in atom_get_src_int
Huang, Tim
Tim.Huang at amd.com
Wed Jun 5 07:32:10 UTC 2024
[AMD Official Use Only - AMD Internal Distribution Only]
Hi Jesse,
> -----Original Message-----
> From: Jesse Zhang <jesse.zhang at amd.com>
> Sent: Monday, June 3, 2024 4:47 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Deucher, Alexander <Alexander.Deucher at amd.com>; Koenig, Christian
> <Christian.Koenig at amd.com>; Kuehling, Felix <Felix.Kuehling at amd.com>;
> Huang, Tim <Tim.Huang at amd.com>; Zhang, Jesse(Jie)
> <Jesse.Zhang at amd.com>; Zhang, Jesse(Jie) <Jesse.Zhang at amd.com>
> Subject: [PATCH 04/12] drm/amdgpu: remove dead code in atom_get_src_int
>
> Since the range of align is 0~7, the expression is: align = (attr >> 3) & 7.
> In the case of ATOM_ARG_IMM, the code cannot reach the default case.
> So there is no need for "break".
>
> Signed-off-by: Jesse Zhang <Jesse.Zhang at amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/atom.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/atom.c
> b/drivers/gpu/drm/amd/amdgpu/atom.c
> index d552e013354c..c660e4a663ef 100644
> --- a/drivers/gpu/drm/amd/amdgpu/atom.c
> +++ b/drivers/gpu/drm/amd/amdgpu/atom.c
> @@ -320,7 +320,6 @@ static uint32_t atom_get_src_int(atom_exec_context
> *ctx, uint8_t attr,
> DEBUG("IMM 0x%02X\n", val);
> return val;
> }
> - break;
This should have new statement may fall through warning if remove the break here?
Tim Huang
> case ATOM_ARG_PLL:
> idx = U8(*ptr);
> (*ptr)++;
> --
> 2.25.1
More information about the amd-gfx
mailing list