mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN
@ 2019-02-14  4:46 Bo YU
  2019-02-14  5:09 ` Zhou, David(ChunMing)
  0 siblings, 1 reply; 2+ messages in thread
From: Bo YU @ 2019-02-14  4:46 UTC (permalink / raw)
  To: alexander.deucher, christian.koenig, David1.Zhou, airlied,
	daniel, Rex.Zhu, andrey.grodzovsky, dri-devel, linux-kernel
  Cc: Bo Yu, amd-gfx

From: Bo Yu <tsu.yubo@gmail.com>

Calling "amdgpu_ring_test_helper" without checking return value

Signed-off-by: Bo Yu <tsu.yubo@gmail.com>
---
 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 = &adev->gfx.compute_ring[i];
-		amdgpu_ring_test_helper(ring);
+		r = amdgpu_ring_test_helper(ring);
+		if (r)
+			return r;
 	}
 
 	return 0;
-- 
2.11.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* RE: [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN
  2019-02-14  4:46 [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN Bo YU
@ 2019-02-14  5:09 ` Zhou, David(ChunMing)
  0 siblings, 0 replies; 2+ messages in thread
From: Zhou, David(ChunMing) @ 2019-02-14  5:09 UTC (permalink / raw)
  To: Bo YU, Deucher, Alexander, Koenig, Christian, airlied, daniel,
	Zhu, Rex, Grodzovsky, Andrey, dri-devel, linux-kernel
  Cc: amd-gfx



> -----Original Message-----
> From: Bo YU <tsu.yubo@gmail.com>
> Sent: Thursday, February 14, 2019 12:46 PM
> To: Deucher, Alexander <Alexander.Deucher@amd.com>; Koenig, Christian
> <Christian.Koenig@amd.com>; Zhou, David(ChunMing)
> <David1.Zhou@amd.com>; airlied@linux.ie; daniel@ffwll.ch; Zhu, Rex
> <Rex.Zhu@amd.com>; Grodzovsky, Andrey
> <Andrey.Grodzovsky@amd.com>; dri-devel@lists.freedesktop.org; linux-
> kernel@vger.kernel.org
> Cc: Bo Yu <tsu.yubo@gmail.com>; amd-gfx@lists.freedesktop.org
> Subject: [PATCH] drm/amdgpu: Error handling issues about
> CHECKED_RETURN
> 
> From: Bo Yu <tsu.yubo@gmail.com>
> 
> 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 <tsu.yubo@gmail.com>
> ---
>  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 = &adev->gfx.compute_ring[i];
> -		amdgpu_ring_test_helper(ring);
> +		r = amdgpu_ring_test_helper(ring);
> +		if (r)
> +			return r;
>  	}
> 
>  	return 0;
> --
> 2.11.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-02-14  5:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-14  4:46 [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN Bo YU
2019-02-14  5:09 ` Zhou, David(ChunMing)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®