Skip to contentSkip to conversation

drm/amdgpu: Fix warning Comparison to bool

PATCH In review Zou Wei 2 participants 2 messages Apr 30, 2020

Subsystems (2)
lore
Share & tools
lore

Zou Wei

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Fix warning Comparison to bool

fix below warnings reported by coccicheck

drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:630:5-11: WARNING: Comparison to bool

---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -1
index b544baf..10080e4 100644
@@ -627,7 +627,7 @@ static void sdma_v5_0_enable(struct amdgpu_device *adev, bool enable)
 	u32 f32_cntl;
 	int i;
 
-	if (enable == false) {
+	if (!enable) {
 		sdma_v5_0_gfx_stop(adev);
 		sdma_v5_0_rlc_stop(adev);
 	}
Signature · 1 line
2.6.2
#1 lore raw
Quoted 4 lines · Zou Wei

fix below warnings reported by coccicheck

drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c:630:5-11: WARNING: Comparison to bool

This seems incorrect. enable is a bool.

Alex

Quoted 23 lines
---
 drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_0.c +1 -2
index b544baf..10080e4 100644
@@ -627,7 +627,7 @@ static void sdma_v5_0_enable(struct amdgpu_device *adev, bool enable)
        u32 f32_cntl;
        int i;
 
-       if (enable == false) {
+       if (!enable) {
                sdma_v5_0_gfx_stop(adev);
                sdma_v5_0_rlc_stop(adev);
        }
--

2.6.2

Quoted 4 lines

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

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