Skip to contentSkip to conversation

drm/vmwgfx: Return boolean instead of integer in vmw_fence_obj_signaled

PATCH In review Gustavo A. R. Silva 2 participants 2 messages Jan 19, 2018

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/vmwgfx: Return boolean instead of integer in vmw_fence_obj_signaled

Return statements in functions returning bool should use true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
index 6c5c75c..35fd6f9 100644
@@ -496,7 +496,7 @@ bool vmw_fence_obj_signaled(struct vmw_fence_obj *fence)
 	struct vmw_fence_manager *fman = fman_from_fence(fence);
 
 	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
-		return 1;
+		return true;
 
 	vmw_fences_update(fman);
 
Signature · 1 line
2.7.4
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Gustavo A. R. Silva

Return statements in functions returning bool should use true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

I'll queue this for 4.17.

Thanks,
Thomas

Quoted 17 lines
---
  drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/vmwgfx/vmwgfx_fence.c +1 -1
index 6c5c75c..35fd6f9 100644
@@ -496,7 +496,7 @@ bool vmw_fence_obj_signaled(struct vmw_fence_obj *fence)
  	struct vmw_fence_manager *fman = fman_from_fence(fence);
 
  	if (test_bit(DMA_FENCE_FLAG_SIGNALED_BIT, &fence->base.flags))
-		return 1;
+		return true;
 
  	vmw_fences_update(fman);