From: cgel.zte@gmail.com
To: linux-graphics-maintainer@vmware.com
Cc: zackr@vmware.com, airlied@linux.ie, daniel@ffwll.ch,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Minghao Chi <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>, CGEL ZTE <cgel.zte@gmail.com>
Subject: [PATCH] vmwgfx: remove redundant ret variable
Date: Mon, 17 Jan 2022 11:03:04 +0000 [thread overview]
Message-ID: <20220117110304.863922-1-chi.minghao@zte.com.cn> (raw)
From: Minghao Chi <chi.minghao@zte.com.cn>
Return value directly instead of taking this in another redundant variable.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
Signed-off-by: CGEL ZTE <cgel.zte@gmail.com>
---
drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
index 44ca23b0ea4e..be5b1a9b48e1 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c
@@ -1263,7 +1263,6 @@ static int vmw_cmd_dx_define_query(struct vmw_private *dev_priv,
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXDefineQuery);
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context);
struct vmw_resource *cotable_res;
- int ret;
if (!ctx_node)
return -EINVAL;
@@ -1275,9 +1274,8 @@ static int vmw_cmd_dx_define_query(struct vmw_private *dev_priv,
return -EINVAL;
cotable_res = vmw_context_cotable(ctx_node->ctx, SVGA_COTABLE_DXQUERY);
- ret = vmw_cotable_notify(cotable_res, cmd->body.queryId);
- return ret;
+ return vmw_cotable_notify(cotable_res, cmd->body.queryId);
}
/**
@@ -2576,7 +2574,6 @@ static int vmw_cmd_dx_so_define(struct vmw_private *dev_priv,
uint32 defined_id;
} *cmd;
enum vmw_so_type so_type;
- int ret;
if (!ctx_node)
return -EINVAL;
@@ -2586,9 +2583,8 @@ static int vmw_cmd_dx_so_define(struct vmw_private *dev_priv,
if (IS_ERR(res))
return PTR_ERR(res);
cmd = container_of(header, typeof(*cmd), header);
- ret = vmw_cotable_notify(res, cmd->defined_id);
- return ret;
+ return vmw_cotable_notify(res, cmd->defined_id);
}
/**
@@ -2726,15 +2722,12 @@ static int vmw_cmd_dx_destroy_shader(struct vmw_private *dev_priv,
struct vmw_ctx_validation_info *ctx_node = VMW_GET_CTX_NODE(sw_context);
VMW_DECLARE_CMD_VAR(*cmd, SVGA3dCmdDXDestroyShader) =
container_of(header, typeof(*cmd), header);
- int ret;
if (!ctx_node)
return -EINVAL;
- ret = vmw_shader_remove(sw_context->man, cmd->body.shaderId, 0,
+ return vmw_shader_remove(sw_context->man, cmd->body.shaderId, 0,
&sw_context->staged_cmd_res);
-
- return ret;
}
/**
--
2.25.1
reply other threads:[~2022-01-17 11:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20220117110304.863922-1-chi.minghao@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=airlied@linux.ie \
--cc=chi.minghao@zte.com.cn \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=zackr@vmware.com \
--cc=zealci@zte.com.cn \
/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
all inboxes | Powered by JetHome®