Skip to contentSkip to conversation

drm/amdgpu: Error handling issues about CHECKED_RETURN

PATCH In review Bo YU 3 participants 3 messages Feb 14, 2019

Subsystems (2)
lore
Share & tools
lore

Bo YU

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Error handling issues about CHECKED_RETURN

From: Bo Yu <[email protected]>

Calling "amdgpu_ring_test_helper" without checking return value

---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -1
index 57cb3a51bda7..48465a61516b 100644
@@ -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;
Signature · 1 line
2.11.0
#1 lore raw
Quoted 15 lines

-----Original Message-----
From: Bo YU <[email protected]>
Sent: Thursday, February 14, 2019 12:46 PM
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; [email protected]; [email protected]; Zhu, Rex <[email protected]>; Grodzovsky, Andrey <[email protected]>; [email protected]; linux- [email protected]
Cc: Bo Yu <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN

Quoted 3 lines

From: Bo Yu <[email protected]>

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -1
index 57cb3a51bda7..48465a61516b 100644
@@ -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;
 	}
 
Quoted 3 lines

return 0;
--
2.11.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

Ok, drop it.

Quoted 45 lines · David(ChunMing)
Quoted 15 lines

-----Original Message-----
From: Bo YU <[email protected]>
Sent: Thursday, February 14, 2019 12:46 PM
To: Deucher, Alexander <[email protected]>; Koenig, Christian <[email protected]>; Zhou, David(ChunMing) <[email protected]>; [email protected]; [email protected]; Zhu, Rex <[email protected]>; Grodzovsky, Andrey <[email protected]>; [email protected]; linux- [email protected]
Cc: Bo Yu <[email protected]>; [email protected]
Subject: [PATCH] drm/amdgpu: Error handling issues about CHECKED_RETURN

Quoted 3 lines

From: Bo Yu <[email protected]>

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

Quoted 22 lines
---
 drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c +3 -1
index 57cb3a51bda7..48465a61516b 100644
@@ -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;
      }
 
Quoted 5 lines
Quoted 3 lines
      return 0;

--
2.11.0

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel