linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: cgel.zte@gmail.com
To: devesh.s.sharma@oracle.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, trix@redhat.com,
	zealci@zte.com.cm, Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable
Date: Tue, 14 Dec 2021 08:10:54 +0000	[thread overview]
Message-ID: <20211214081054.438166-1-chi.minghao@zte.com.cn> (raw)
In-Reply-To: <CO6PR10MB5635FDF74CA549F662C33F4DDD759@CO6PR10MB5635.namprd10.prod.outlook.com>

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

Return status directly from function called.

Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn>
---
change since v2: [PATCHv2] drivers:ocrdma:remove unneeded variable
             v3: [PATCH v3 ocrdma-next] drivers: ocrdma: remove unneeded variable 
 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-14  8:11 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   ` [PATCHv2] " cgel.zte
2021-12-14  6:45     ` Devesh Sharma
2021-12-14  8:10       ` cgel.zte [this message]
2021-12-14  8:43         ` [External] : [PATCH v3 ocrdma-next] drivers: ocrdma: remove " 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=20211214081054.438166-1-chi.minghao@zte.com.cn \
    --to=cgel.zte@gmail.com \
    --cc=chi.minghao@zte.com.cn \
    --cc=dennis.dalessandro@cornelisnetworks.com \
    --cc=devesh.s.sharma@oracle.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 \
    --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;
as well as URLs for NNTP newsgroup(s).