mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Rix <trix@redhat.com>
To: cgel.zte@gmail.com, selvin.xavier@broadcom.com
Cc: dledford@redhat.com, jgg@ziepe.ca, leon@kernel.org,
	dennis.dalessandro@cornelisnetworks.com, galpress@amazon.com,
	chi.minghao@zte.com.cn, mbloch@nvidia.com,
	linux-rdma@vger.kernel.org, linux-kernel@vger.kernel.org,
	Zeal Robot <zealci@zte.com.cm>
Subject: Re: [PATCH] drivers:ocrdma:remove unneeded variable
Date: Thu, 9 Dec 2021 05:08:19 -0800	[thread overview]
Message-ID: <260ff018-bf5b-07da-6988-c65c04f5bcb5@redhat.com> (raw)
In-Reply-To: <20211209015206.409528-1-chi.minghao@zte.com.cn>


On 12/8/21 5:52 PM, cgel.zte@gmail.com wrote:
> From: chiminghao <chi.minghao@zte.com.cn>
>
> return value form directly instead of
form
> taking this in another redundant variable.

Clean this message up.

Maybe just 'Return status directly from function called.'

Change itself looks fine.

Reviewed-by: Tom Rix <trix@redhat.com>

>
> Reported-by: Zeal Robot <zealci@zte.com.cm>
> Signed-off-by: chiminghao <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,


  reply	other threads:[~2021-12-09 13:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09  1:52 cgel.zte
2021-12-09 13:08 ` Tom Rix [this message]
2021-12-10  1:32   ` [PATCHv2] " cgel.zte
2021-12-14  6:45     ` 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=260ff018-bf5b-07da-6988-c65c04f5bcb5@redhat.com \
    --to=trix@redhat.com \
    --cc=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=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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome