diff mbox

drm/vmwgfx: Return boolean instead of integer in vmw_fence_obj_signaled

Message ID 20180119000251.GA27376@embeddedor.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gustavo A. R. Silva Jan. 19, 2018, 12:02 a.m. UTC
Return statements in functions returning bool should use
true/false instead of 1/0.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
---
 drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Hellstrom Jan. 19, 2018, 12:40 p.m. UTC | #1
On 01/19/2018 01:02 AM, Gustavo A. R. Silva wrote:
> Return statements in functions returning bool should use
> true/false instead of 1/0.
>
> This issue was detected with the help of Coccinelle.
>
> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Reviewed-by: Thomas Hellström <thellstrom@vmware.com>

I'll queue this for 4.17.

Thanks,
Thomas




> ---
>   drivers/gpu/drm/vmwgfx/vmwgfx_fence.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index 6c5c75c..35fd6f9 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -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);
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 6c5c75c..35fd6f9 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -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);