All of lore.kernel.org
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: trix@redhat.com
Cc: cgel.zte@gmail.com, chi.minghao@zte.com.cn,
	dennis.dalessandro@cornelisnetworks.com, dledford@redhat.com,
	galpress@amazon.com, jgg@ziepe.ca, leon@kernel.org,
	linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org,
	mbloch@nvidia.com, selvin.xavier@broadcom.com, zealci@zte.com.cm
Subject: [PATCHv2] drivers:ocrdma:remove unneeded variable
Date: Fri, 10 Dec 2021 01:32:47 +0000	[thread overview]
Message-ID: <20211210013247.423430-1-chi.minghao@zte.com.cn> (raw)
In-Reply-To: <260ff018-bf5b-07da-6988-c65c04f5bcb5@redhat.com>

From: Minghao Chi <chi.minghao@zte.com.cn>

Return status directly from function called.

Reported-by: Zeal Robot <zealci@zte.com.cm>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
 drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
index 735123d0e9ec..3bfbf4ec040d 100644
--- a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
+++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
@@ -1844,12 +1844,10 @@ int ocrdma_modify_srq(struct ib_srq *ibsrq,
 
 int ocrdma_query_srq(struct ib_srq *ibsrq, struct ib_srq_attr *srq_attr)
 {
-	int status;
 	struct ocrdma_srq *srq;
 
 	srq = get_ocrdma_srq(ibsrq);
-	status = ocrdma_mbx_query_srq(srq, srq_attr);
-	return status;
+	return ocrdma_mbx_query_srq(srq, srq_attr);
 }
 
 int ocrdma_destroy_srq(struct ib_srq *ibsrq, struct ib_udata *udata)
@@ -1960,7 +1958,6 @@ static int ocrdma_build_inline_sges(struct ocrdma_qp *qp,
 static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
 			     const struct ib_send_wr *wr)
 {
-	int status;
 	struct ocrdma_sge *sge;
 	u32 wqe_size = sizeof(*hdr);
 
@@ -1972,8 +1969,7 @@ static int ocrdma_build_send(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
 		sge = (struct ocrdma_sge *)(hdr + 1);
 	}
 
-	status = ocrdma_build_inline_sges(qp, hdr, sge, wr, wqe_size);
-	return status;
+	return ocrdma_build_inline_sges(qp, hdr, sge, wr, wqe_size);
 }
 
 static int ocrdma_build_write(struct ocrdma_qp *qp, struct ocrdma_hdr_wqe *hdr,
-- 
2.25.1


  reply	other threads:[~2021-12-10  1:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  1:52 [PATCH] drivers:ocrdma:remove unneeded variable cgel.zte
2021-12-09 13:08 ` Tom Rix
2021-12-10  1:32   ` cgel.zte [this message]
2021-12-14  6:45     ` [PATCHv2] " Devesh Sharma
2021-12-14  8:10       ` [PATCH v3 ocrdma-next] drivers: ocrdma: remove " cgel.zte
2021-12-14  8:43         ` [External] : " Devesh Sharma
2021-12-14  9:23           ` [PATCH for-next v4] RDMA/ocrdma: " cgel.zte
2021-12-14 11:12             ` [External] : " Devesh Sharma
2021-12-14 23:50             ` Jason Gunthorpe
2021-12-15  5:54               ` [PATCH for-next v5] " cgel.zte
2022-01-03  7:58                 ` Leon Romanovsky
2022-01-05 17:54                 ` Jason Gunthorpe

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=20211210013247.423430-1-chi.minghao@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=dledford@redhat.com \
    --cc=galpress@amazon.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mbloch@nvidia.com \
    --cc=selvin.xavier@broadcom.com \
    --cc=trix@redhat.com \
    --cc=zealci@zte.com.cm \
    /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.