[PATCH] drm/amdgpu: Resolve RAS GFX error count issue v2

Alex Deucher alexdeucher at gmail.com
Wed Jun 1 17:19:07 UTC 2022


On Wed, Jun 1, 2022 at 1:10 PM Candice Li <candice.li at amd.com> wrote:
>
> Fix misleading indentation
>

Might want to split this into two patches, one to fix the indentation
and one to fix the missing function call.  Also you should mention the
missing function call in the else case.

> Signed-off-by: Candice Li <candice.li at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 9 +++++----
>  1 file changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> index 99c1a2d3dae84d..424990e1bec10c 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
> @@ -599,14 +599,15 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
>                 if (!amdgpu_persistent_edc_harvesting_supported(adev))
>                         amdgpu_ras_reset_error_status(adev, AMDGPU_RAS_BLOCK__GFX);
>
> -       r = amdgpu_ras_block_late_init(adev, ras_block);
> -       if (r)
> -               return r;
> +               r = amdgpu_ras_block_late_init(adev, ras_block);
> +               if (r)
> +                       return r;
>
>                 r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
>                 if (r)
>                         goto late_fini;
> -       }
> +       } else
> +               amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);

Coding style.  The else case needs { } as well to match kernel coding
style guidelines.

Alex


>
>         return 0;
>  late_fini:
> --
> 2.17.1
>


More information about the amd-gfx mailing list