kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sinclair Yeh <syeh@vmware.com>
To: Colin King <colin.king@canonical.com>
Cc: Thomas Hellstrom <thellstrom@vmware.com>,
	David Airlie <airlied@linux.ie>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>,
	linux-graphics-maintainer <linux-graphics-maintainer@vmware.com>
Subject: Re: [PATCH][drm-next] drm/vmwgfx: remove redundant return ret statement
Date: Thu, 04 Oct 2018 20:17:14 +0000	[thread overview]
Message-ID: <20181004201309.GA9246@vmware.com> (raw)
In-Reply-To: <20181004174953.28107-1-colin.king@canonical.com>

Good catch.

Reviewed-by: Sinclair Yeh <syeh@vmware.com>

On Thu, Oct 04, 2018 at 06:49:53PM +0100, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
> 
> The return statement is redundant as there is a return statement
> immediately before it so we have dead code that can be removed.
> Also remove the unused declaration of ret.
> 
> Detected by CoverityScan, CID#1473793 ("Structurally dead code")
> 
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> index 5a6b70ba137a..260650bb5560 100644
> --- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
> @@ -1738,7 +1738,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv,
>  				      void *buf)
>  {
>  	struct vmw_buffer_object *vmw_bo;
> -	int ret;
>  
>  	struct {
>  		uint32_t header;
> @@ -1748,7 +1747,6 @@ static int vmw_cmd_check_define_gmrfb(struct vmw_private *dev_priv,
>  	return vmw_translate_guest_ptr(dev_priv, sw_context,
>  				       &cmd->body.ptr,
>  				       &vmw_bo);
> -	return ret;
>  }
>  
>  
> -- 
> 2.17.1
> 

  reply	other threads:[~2018-10-04 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-04 17:49 [PATCH][drm-next] drm/vmwgfx: remove redundant return ret statement Colin King
2018-10-04 20:17 ` Sinclair Yeh [this message]
2018-10-11  7:06 ` Dan Carpenter

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=20181004201309.GA9246@vmware.com \
    --to=syeh@vmware.com \
    --cc=airlied@linux.ie \
    --cc=colin.king@canonical.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-graphics-maintainer@vmware.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thellstrom@vmware.com \
    /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;
as well as URLs for NNTP newsgroup(s).