From: Jakob Bornecrantz <jakob@vmware.com>
To: Dave Jones <davej@redhat.com>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: vmwgfx: remove identical branches
Date: Tue, 22 Jul 2014 15:06:34 -0700 (PDT) [thread overview]
Message-ID: <272182693.34271636.1406066794514.JavaMail.root@vmware.com> (raw)
In-Reply-To: <20140722164927.GA21479@redhat.com>
----- 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)
>
prev parent reply other threads:[~2014-07-22 22:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-22 16:49 vmwgfx: remove identical branches Dave Jones
2014-07-22 22:06 ` Jakob Bornecrantz [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=272182693.34271636.1406066794514.JavaMail.root@vmware.com \
--to=jakob@vmware.com \
--cc=davej@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox