All of lore.kernel.org
 help / color / mirror / Atom feed
From: <zhang.songyi@zte.com.cn>
To: <saeedm@nvidia.com>
Cc: <leon@kernel.org>, <davem@davemloft.net>, <edumazet@google.com>,
	<kuba@kernel.org>, <pabeni@redhat.com>, <kliteyn@nvidia.com>,
	<shunh@nvidia.com>, <rongweil@nvidia.com>, <valex@nvidia.com>,
	<zhang.songyi@zte.com.cn>, <netdev@vger.kernel.org>,
	<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<jiang.xuexin@zte.com.cn>, <xue.zhihong@zte.com.cn>
Subject: [PATCH linux-next] net/mlx5: remove redundant ret variable
Date: Wed, 2 Nov 2022 21:50:40 +0800 (CST)	[thread overview]
Message-ID: <202211022150403300510@zte.com.cn> (raw)

From 74562e313cf9a1b96c7030f27964f826a0c2572d Mon Sep 17 00:00:00 2001
From: zhang songyi <zhang.songyi@zte.com.cn>
Date: Wed, 2 Nov 2022 20:48:08 +0800
Subject: [PATCH linux-next] net/mlx5: remove redundant ret variable

Return value from mlx5dr_send_postsend_action() directly instead of taking
this in another redundant variable.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: zhang songyi <zhang.songyi@zte.com.cn>
---
 drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
index a4476cb4c3b3..fd2d31cdbcf9 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/steering/dr_send.c
@@ -724,7 +724,6 @@ int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn,
                struct mlx5dr_action *action)
 {
    struct postsend_info send_info = {};
-   int ret;

    send_info.write.addr = (uintptr_t)action->rewrite->data;
    send_info.write.length = action->rewrite->num_of_actions *
@@ -734,9 +733,7 @@ int mlx5dr_send_postsend_action(struct mlx5dr_domain *dmn,
        mlx5dr_icm_pool_get_chunk_mr_addr(action->rewrite->chunk);
    send_info.rkey = mlx5dr_icm_pool_get_chunk_rkey(action->rewrite->chunk);

-   ret = dr_postsend_icm_data(dmn, &send_info);
-
-   return ret;
+   return dr_postsend_icm_data(dmn, &send_info);
 }

 static int dr_modify_qp_rst2init(struct mlx5_core_dev *mdev,
--
2.15.2

             reply	other threads:[~2022-11-02 14:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-02 13:50 zhang.songyi [this message]
2022-11-06 18:56 ` [PATCH linux-next] net/mlx5: remove redundant ret variable Leon Romanovsky
2022-11-11 22:31   ` Saeed Mahameed

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=202211022150403300510@zte.com.cn \
    --to=zhang.songyi@zte.com.cn \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jiang.xuexin@zte.com.cn \
    --cc=kliteyn@nvidia.com \
    --cc=kuba@kernel.org \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=rongweil@nvidia.com \
    --cc=saeedm@nvidia.com \
    --cc=shunh@nvidia.com \
    --cc=valex@nvidia.com \
    --cc=xue.zhihong@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 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.