Re: [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN

2019-02-14 Thread Bo YU via amd-gfx
Ok, drop it.

On Thu, Feb 14, 2019 at 1:09 PM Zhou, David(ChunMing) 
wrote:

>
>
> > -Original Message-
> > From: Bo YU 
> > Sent: Thursday, February 14, 2019 12:46 PM
> > To: Deucher, Alexander ; Koenig, Christian
> > ; Zhou, David(ChunMing)
> > ; airl...@linux.ie; dan...@ffwll.ch; Zhu, Rex
> > ; Grodzovsky, Andrey
> > ; dri-de...@lists.freedesktop.org; linux-
> > ker...@vger.kernel.org
> > Cc: Bo Yu ; amd-gfx@lists.freedesktop.org
> > Subject: [PATCH] drm/amdgpu: Error handling issues about
> > CHECKED_RETURN
> >
> > From: Bo Yu 
> >
> > Calling "amdgpu_ring_test_helper" without checking return value
>
> We could need to continue to ring test even there is one ring test failed.
>
> -David
>
> >
> > Signed-off-by: Bo Yu 
> > ---
> >  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++-
> >  1 file changed, 3 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> > b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> > index 57cb3a51bda7..48465a61516b 100644
> > --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> > +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> > @@ -4728,7 +4728,9 @@ static int gfx_v8_0_cp_test_all_rings(struct
> > amdgpu_device *adev)
> >
> >   for (i = 0; i < adev->gfx.num_compute_rings; i++) {
> >   ring = >gfx.compute_ring[i];
> > - amdgpu_ring_test_helper(ring);
> > + r = amdgpu_ring_test_helper(ring);
> > + if (r)
> > + return r;
> >   }
> >
> >   return 0;
> > --
> > 2.11.0
>
>
___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN

2019-02-13 Thread Zhou, David(ChunMing)


> -Original Message-
> From: Bo YU 
> Sent: Thursday, February 14, 2019 12:46 PM
> To: Deucher, Alexander ; Koenig, Christian
> ; Zhou, David(ChunMing)
> ; airl...@linux.ie; dan...@ffwll.ch; Zhu, Rex
> ; Grodzovsky, Andrey
> ; dri-de...@lists.freedesktop.org; linux-
> ker...@vger.kernel.org
> Cc: Bo Yu ; amd-gfx@lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: Error handling issues about
> CHECKED_RETURN
> 
> From: Bo Yu 
> 
> Calling "amdgpu_ring_test_helper" without checking return value

We could need to continue to ring test even there is one ring test failed.

-David

> 
> Signed-off-by: Bo Yu 
> ---
>  drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> index 57cb3a51bda7..48465a61516b 100644
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
> @@ -4728,7 +4728,9 @@ static int gfx_v8_0_cp_test_all_rings(struct
> amdgpu_device *adev)
> 
>   for (i = 0; i < adev->gfx.num_compute_rings; i++) {
>   ring = >gfx.compute_ring[i];
> - amdgpu_ring_test_helper(ring);
> + r = amdgpu_ring_test_helper(ring);
> + if (r)
> + return r;
>   }
> 
>   return 0;
> --
> 2.11.0

___
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx