From: Leon Romanovsky <leon-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
Cc: Devesh Sharma
<devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
linux-rdma <linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [bug report] RDMA/bnxt_re: Add SRQ support for Broadcom adapters
Date: Wed, 31 Jan 2018 08:48:29 +0200 [thread overview]
Message-ID: <20180131064829.GR2055@mtr-leonro.local> (raw)
In-Reply-To: <20180131063238.ch4mcl7c6ps7ykxe@mwanda>
[-- Attachment #1: Type: text/plain, Size: 1988 bytes --]
On Wed, Jan 31, 2018 at 09:32:38AM +0300, Dan Carpenter wrote:
> On Wed, Jan 31, 2018 at 11:16:55AM +0530, Devesh Sharma wrote:
> > On Tue, Jan 30, 2018 at 6:15 PM, Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org> wrote:
> > > Hello Devesh Sharma,
> > >
> > > The patch 37cb11acf1f7: "RDMA/bnxt_re: Add SRQ support for Broadcom
> > > adapters" from Jan 11, 2018, leads to the following static checker
> > > warning:
> > >
> > > drivers/infiniband/hw/bnxt_re/ib_verbs.c:1317 bnxt_re_destroy_srq()
> > > warn: 'srq->umem' isn't an ERR_PTR
> > >
> > > drivers/infiniband/hw/bnxt_re/ib_verbs.c
> > > 1313 dev_err(rdev_to_dev(rdev), "Destroy HW SRQ failed!");
> > > 1314 return rc;
> > > 1315 }
> > > 1316
> > > 1317 if (srq->umem && !IS_ERR(srq->umem))
> > > ^^^^^^^^^^^^^^^^
> > > We never store error pointers to srq->umem. It's pretty consistently
> > > checked for error pointers though so maybe that's fine. It causes a
> > > static checker warning because error pointer confusion is a pretty
> > > common source of bugs. Anyway, feel free to ignore if you want...
> > Thanks for reporting Dan,
> >
> > Is there a way out, I want to call ib_umem_release only if it was valid.
> > I think if ib_umem_release checks for the validity of pointer then I
> > can get rid of this?
> > There are other places also in bnxt_re driver where such checks are present.
>
> Yeah. Those places generate warnings as well, but I thought one was
> enough. It's fine if you want to ignore the warning, no one will be
> upset. :P
Not really, we are trying to clean the subsystem from the warnings
and driver authors who ignore such warnings simply and very effective
sabotage it.
Currently my checks print ~400 warnings for the drivers/infiniband/* +
drivers/net/ethernet/mellanox/*
So please don't increase this number, or fix the driver or fix the tool :)
Thanks
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2018-01-31 6:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-30 12:45 [bug report] RDMA/bnxt_re: Add SRQ support for Broadcom adapters Dan Carpenter
2018-01-31 5:46 ` Devesh Sharma
[not found] ` <CANjDDBiiL1TtH5OZ9gYuiZquKu2=AV+u9nJDQ--qibOP5CXgYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-01-31 6:32 ` Dan Carpenter
2018-01-31 6:48 ` Leon Romanovsky [this message]
[not found] ` <20180131064829.GR2055-U/DQcQFIOTAAJjI8aNfphQ@public.gmane.org>
2018-01-31 16:04 ` Doug Ledford
[not found] ` <1517414670.19117.16.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-01-31 21:07 ` Doug Ledford
[not found] ` <1517432861.19117.42.camel-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2018-02-01 3:34 ` Devesh Sharma
2018-02-01 17:44 ` 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=20180131064829.GR2055@mtr-leonro.local \
--to=leon-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
--cc=dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org \
--cc=devesh.sharma-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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