Re: [PATCH rdma-next] RDMA/mlx5: Fix static analyzer error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Feb 19, 2019 at 05:47:41PM +0200, Moni Shoua wrote:
> > This kind of change makes the code confusing to human readers. Have you
> > considered to add a BUG_ON(!qp) or WARN_ON(!qp) with a comment that
> > refers to sparse instead?
> >
> > Thanks,
> >
> > Bart.
> >
> >
> > This kind of change makes the code confusing to human readers. Have you
> > considered to add a BUG_ON(!qp) or WARN_ON(!qp) with a comment that
> > refers to sparse instead?
> >
> > Thanks,
> >
> I'm not sure that this kind of fix will satisfy the static checker. It
> depends how it understand BUG_ON().

I didn't ever think to use BUG_ON(), because we are trying to get rid of them.
Regarding WARN_ON(), I have the same comment as Moni, it is unclear how
static analysis tools will handle WARN_ON().

Thanks

>
> Moni

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux