* vmwgfx: remove identical branches
@ 2014-07-22 16:49 Dave Jones
2014-07-22 22:06 ` Jakob Bornecrantz
0 siblings, 1 reply; 2+ messages in thread
From: Dave Jones @ 2014-07-22 16:49 UTC (permalink / raw)
To: Linux Kernel; +Cc: jakob
Commit 8b7de6aa8468: "vmwgfx: Rework fence event action" removed the
tv_sec & tv_usec arguments to vmw_event_fence_action_create, which meant
that both sides of the if/else are now exactly the same.
Remove the flag check, and just do it unconditionally.
Spotted with Coverity.
Signed-off-by: Dave Jones <davej@redhat.com>
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
index 436b013b4231..a078e6bbaf0a 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
@@ -1124,16 +1124,10 @@ int vmw_fence_event_ioctl(struct drm_device *dev, void *data,
BUG_ON(fence == NULL);
- if (arg->flags & DRM_VMW_FE_FLAG_REQ_TIME)
- ret = vmw_event_fence_action_create(file_priv, fence,
- arg->flags,
- arg->user_data,
- true);
- else
- ret = vmw_event_fence_action_create(file_priv, fence,
- arg->flags,
- arg->user_data,
- true);
+ ret = vmw_event_fence_action_create(file_priv, fence,
+ arg->flags,
+ arg->user_data,
+ true);
if (unlikely(ret != 0)) {
if (ret != -ERESTARTSYS)
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: vmwgfx: remove identical branches
2014-07-22 16:49 vmwgfx: remove identical branches Dave Jones
@ 2014-07-22 22:06 ` Jakob Bornecrantz
0 siblings, 0 replies; 2+ messages in thread
From: Jakob Bornecrantz @ 2014-07-22 22:06 UTC (permalink / raw)
To: Dave Jones; +Cc: Linux Kernel
----- Original Message -----
> Commit 8b7de6aa8468: "vmwgfx: Rework fence event action" removed the
> tv_sec & tv_usec arguments to vmw_event_fence_action_create, which meant
> that both sides of the if/else are now exactly the same.
>
> Remove the flag check, and just do it unconditionally.
>
> Spotted with Coverity.
>
> Signed-off-by: Dave Jones <davej@redhat.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
and thanks for the patch.
Cheers, Jakob.
>
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> index 436b013b4231..a078e6bbaf0a 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_fence.c
> @@ -1124,16 +1124,10 @@ int vmw_fence_event_ioctl(struct drm_device *dev,
> void *data,
>
> BUG_ON(fence == NULL);
>
> - if (arg->flags & DRM_VMW_FE_FLAG_REQ_TIME)
> - ret = vmw_event_fence_action_create(file_priv, fence,
> - arg->flags,
> - arg->user_data,
> - true);
> - else
> - ret = vmw_event_fence_action_create(file_priv, fence,
> - arg->flags,
> - arg->user_data,
> - true);
> + ret = vmw_event_fence_action_create(file_priv, fence,
> + arg->flags,
> + arg->user_data,
> + true);
>
> if (unlikely(ret != 0)) {
> if (ret != -ERESTARTSYS)
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-07-22 22:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-22 16:49 vmwgfx: remove identical branches Dave Jones
2014-07-22 22:06 ` Jakob Bornecrantz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.