From: Leon Romanovsky <leon@kernel.org>
To: Siva Reddy Kallam <siva.kallam@broadcom.com>
Cc: jgg@nvidia.com, linux-rdma@vger.kernel.org,
usman.ansari@broadcom.com, Simon Horman <horms@kernel.org>,
kernel test robot <lkp@intel.com>,
Dan Carpenter <error27@gmail.com>
Subject: Re: [PATCH] RDMA/bng_re: Unwind bng_re_dev_init properly and remove unnecessary rdev check
Date: Mon, 12 Jan 2026 11:45:30 +0200 [thread overview]
Message-ID: <20260112094530.GD14378@unreal> (raw)
In-Reply-To: <CAMet4B4f1itHok0AxExs2dZdGvAExjuESrB+aUTwO_QbTA-SYA@mail.gmail.com>
On Mon, Jan 12, 2026 at 02:44:05PM +0530, Siva Reddy Kallam wrote:
> On Sun, Jan 11, 2026 at 6:53 PM Leon Romanovsky <leon@kernel.org> wrote:
> >
> > On Wed, Jan 07, 2026 at 09:16:07AM +0000, Siva Reddy Kallam wrote:
> > > Fix below smatch warnings:
> > > drivers/infiniband/hw/bng_re/bng_dev.c:113
> > > bng_re_net_ring_free() warn: variable dereferenced before check 'rdev'
> > > (see line 107)
> > > drivers/infiniband/hw/bng_re/bng_dev.c:270
> > > bng_re_dev_init() warn: missing unwind goto?
> >
> > Please provide commit message.
> Sure, will do in next version of patch.
> >
> > >
> > > Fixes: 4f830cd8d7fe ("RDMA/bng_re: Add infrastructure for enabling Firmware channel")
> > > Reported-by: Simon Horman <horms@kernel.org>
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Reported-by: Dan Carpenter <error27@gmail.com>
> > > Closes: https://lore.kernel.org/r/202601010413.sWadrQel-lkp@intel.com/
> > > Signed-off-by: Siva Reddy Kallam <siva.kallam@broadcom.com>
> > > Reviewed-by: Usman Ansari <usman.ansari@broadcom.com>
> > > ---
> > > drivers/infiniband/hw/bng_re/bng_dev.c | 33 +++++++++++++-------------
> > > 1 file changed, 16 insertions(+), 17 deletions(-)
> > >
> > > diff --git a/drivers/infiniband/hw/bng_re/bng_dev.c b/drivers/infiniband/hw/bng_re/bng_dev.c
> > > index d8f8d7f7075f..e2dd2c8eb6d2 100644
> > > --- a/drivers/infiniband/hw/bng_re/bng_dev.c
> > > +++ b/drivers/infiniband/hw/bng_re/bng_dev.c
> > > @@ -124,9 +124,6 @@ static int bng_re_net_ring_free(struct bng_re_dev *rdev,
> > > struct bnge_fw_msg fw_msg = {};
> > > int rc = -EINVAL;
> > >
> > > - if (!rdev)
> >
> > You have other places with impossible "if (rdev)" check in this path which you should
> > delete as well.
> Hi Leon,
> I see only one "if (rdev)" in bng_re_remove . Are you referring to that?
Yes, this is the place I noticed as well, but I would welcome a more
general cleanup.
Thanks
next prev parent reply other threads:[~2026-01-12 9:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-07 9:16 [PATCH] RDMA/bng_re: Unwind bng_re_dev_init properly and remove unnecessary rdev check Siva Reddy Kallam
2026-01-11 13:22 ` Leon Romanovsky
2026-01-12 9:14 ` Siva Reddy Kallam
2026-01-12 9:45 ` Leon Romanovsky [this message]
2026-01-12 10:15 ` Siva Reddy Kallam
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=20260112094530.GD14378@unreal \
--to=leon@kernel.org \
--cc=error27@gmail.com \
--cc=horms@kernel.org \
--cc=jgg@nvidia.com \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.com \
--cc=siva.kallam@broadcom.com \
--cc=usman.ansari@broadcom.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.