From: Jason Gunthorpe <jgg@nvidia.com>
To: Tong Zhang <ztong0001@gmail.com>
Cc: <selvin.xavier@broadcom.com>, <devesh.sharma@broadcom.com>,
<dledford@redhat.com>, <kamalheib1@gmail.com>, <leon@kernel.org>,
<maxg@mellanox.com>, <monis@mellanox.com>,
<gustavoars@kernel.org>, <galpress@amazon.com>,
<linux-rdma@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Bernard Metzler <bmt@zurich.ibm.com>
Subject: Re: [PATCH] RDMA: error code handling
Date: Wed, 9 Sep 2020 13:38:56 -0300 [thread overview]
Message-ID: <20200909163856.GA882940@nvidia.com> (raw)
In-Reply-To: <20200824234422.1261394-1-ztong0001@gmail.com>
On Mon, Aug 24, 2020 at 07:44:21PM -0400, Tong Zhang wrote:
> ocrdma_qp_state_change() returns 1 when new and old state are the same,
> however caller is checking using <0
>
> Signed-off-by: Tong Zhang <ztong0001@gmail.com>
> drivers/infiniband/hw/ocrdma/ocrdma_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> index c1751c9a0f62..518687c5e2cb 100644
> +++ b/drivers/infiniband/hw/ocrdma/ocrdma_verbs.c
> @@ -1384,7 +1384,7 @@ int _ocrdma_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr,
> /* if new and previous states are same hw doesn't need to
> * know about it.
> */
> - if (status < 0)
> + if (status == 1)
> return status;
> return ocrdma_mbx_modify_qp(dev, qp, attr, attr_mask);
I'm not comfortable with this patch unless someone from Broadcom
approves it.
Skipping the modify_qp just because the state is the same looks wrong
to me in the first place, I would rather see the dead code removed as
a no-change patch.
Jason
prev parent reply other threads:[~2020-09-09 16:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-24 23:44 Tong Zhang
2020-09-02 9:03 ` Leon Romanovsky
2020-09-09 16:38 ` Jason Gunthorpe [this message]
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=20200909163856.GA882940@nvidia.com \
--to=jgg@nvidia.com \
--cc=bmt@zurich.ibm.com \
--cc=devesh.sharma@broadcom.com \
--cc=dledford@redhat.com \
--cc=galpress@amazon.com \
--cc=gustavoars@kernel.org \
--cc=kamalheib1@gmail.com \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=maxg@mellanox.com \
--cc=monis@mellanox.com \
--cc=selvin.xavier@broadcom.com \
--cc=ztong0001@gmail.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
Powered by JetHome