linux-rdma.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Lobakin <alobakin@marvell.com>
To: Colin King <colin.king@canonical.com>
Cc: Alexander Lobakin <alobakin@marvell.com>,
	Michal Kalderon <mkalderon@marvell.com>,
	Ariel Elior <aelior@marvell.com>,
	Doug Ledford <dledford@redhat.com>,
	Jason Gunthorpe <jgg@ziepe.ca>,
	Igor Russkikh <irusskikh@marvell.com>,
	"David S. Miller" <davem@davemloft.net>,
	<linux-rdma@vger.kernel.org>, <kernel-janitors@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] qed: fix assignment of n_rq_elems to incorrect params field
Date: Mon, 27 Jul 2020 17:36:04 +0300	[thread overview]
Message-ID: <20200727143604.3835-1-alobakin@marvell.com> (raw)
In-Reply-To: <20200727141712.112906-1-colin.king@canonical.com>

Hi Colin,

From: Colin King <colin.king@canonical.com>
Date: Mon, 27 Jul 2020 15:17:12 +0100

> From: Colin Ian King <colin.king@canonical.com>
> 
> Currently n_rq_elems is being assigned to params.elem_size instead of the
> field params.num_elems.  Coverity is detecting this as a double assingment
> to params.elem_size and reporting this as an usused value on the first
> assignment.  Fix this.
> 
> Addresses-Coverity: ("Unused value")
> Fixes: b6db3f71c976 ("qed: simplify chain allocation with init params struct")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>  drivers/infiniband/hw/qedr/verbs.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/infiniband/hw/qedr/verbs.c b/drivers/infiniband/hw/qedr/verbs.c
> index 5a80471577a6..4ce4e2eef6cc 100644
> --- a/drivers/infiniband/hw/qedr/verbs.c
> +++ b/drivers/infiniband/hw/qedr/verbs.c
> @@ -1930,7 +1930,7 @@ qedr_roce_create_kernel_qp(struct qedr_dev *dev,
>  	in_params->sq_pbl_ptr = qed_chain_get_pbl_phys(&qp->sq.pbl);
>  
>  	params.intended_use = QED_CHAIN_USE_TO_CONSUME_PRODUCE;
> -	params.elem_size = n_rq_elems;
> +	params.num_elems = n_rq_elems;

Sorry for copy'n'paste braino. Thanks for catching.

>  	params.elem_size = QEDR_RQE_ELEMENT_SIZE;
>  
>  	rc = dev->ops->common->chain_alloc(dev->cdev, &qp->rq.pbl, &params);
> -- 
> 2.27.0

Acked-by: Alexander Lobakin <alobakin@marvell.com>

Al

  reply	other threads:[~2020-07-27 14:36 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-27 14:17 [PATCH] qed: fix assignment of n_rq_elems to incorrect params field Colin King
2020-07-27 14:36 ` Alexander Lobakin [this message]
2020-07-27 14:39   ` Colin Ian King
2020-07-27 16:17 ` Jason Gunthorpe
2020-07-27 19:46   ` David Miller

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=20200727143604.3835-1-alobakin@marvell.com \
    --to=alobakin@marvell.com \
    --cc=aelior@marvell.com \
    --cc=colin.king@canonical.com \
    --cc=davem@davemloft.net \
    --cc=dledford@redhat.com \
    --cc=irusskikh@marvell.com \
    --cc=jgg@ziepe.ca \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=mkalderon@marvell.com \
    /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).