[PATCH] drm/radeon: Fix multiple line dereference in 'atom_iio_execute'
Alex Deucher
alexdeucher at gmail.com
Wed Aug 9 12:40:13 UTC 2023
On Wed, Aug 9, 2023 at 5:50 AM Srinivasan Shanmugam
<srinivasan.shanmugam at amd.com> wrote:
>
> Fixes the following:
>
> WARNING: Avoid multiple line dereference - prefer 'ctx->io_attr'
> + ((ctx->
> + io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 -
>
> Cc: Guchun Chen <guchun.chen at amd.com>
> Cc: Christian König <christian.koenig at amd.com>
> Cc: Alex Deucher <alexander.deucher at amd.com>
> Cc: "Pan, Xinhui" <Xinhui.Pan at amd.com>
> Signed-off-by: Srinivasan Shanmugam <srinivasan.shanmugam at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
> ---
> drivers/gpu/drm/radeon/atom.c | 10 +++-------
> 1 file changed, 3 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c
> index 93acb0e42bd6..ceb6d772ef94 100644
> --- a/drivers/gpu/drm/radeon/atom.c
> +++ b/drivers/gpu/drm/radeon/atom.c
> @@ -163,13 +163,9 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
> ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
> CU8(base + 3));
> temp |=
> - ((ctx->
> - io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 -
> - CU8
> - (base
> - +
> - 1))))
> - << CU8(base + 3);
> + ((ctx->io_attr >> CU8(base + 2)) &
> + (0xFFFFFFFF >> (32 - CU8(base + 1)))) <<
> + CU8(base + 3);
> base += 4;
> break;
> case ATOM_IIO_END:
> --
> 2.25.1
>
More information about the amd-gfx
mailing list