[ofa-general] Re: Possible ipath bugs detected by compiler/sparse warnings

Arthur Jones arthur.jones at qlogic.com
Fri Jan 11 13:10:28 PST 2008


hi roland, ...

On Fri, Jan 11, 2008 at 11:40:53AM -0800, Roland Dreier wrote:
> I've been looking at warnings coming from running sparse on
> drivers/infiniband [...]

do you have a way to turn down the false positives
on make C=1|2?  i get a lot of spurious warnings
on ARRAY_SIZE and the list_for_each macros.  a new
sparse perhaps?  or do you just grind your way through?

>                [...] and I've spotted a few things in ipath that look
> like real bugs, but I don't know enough about the HW to know how to
> fix things properly.  It all looks like error path stuff that wouldn't
> get exercised very often.  Here's what I've seen:
> 
> ipath_iba6110.c:840:
>  [...]
> ipath_intr.c:835:
>  [...]

i don't know right now, but i'll find out, they both
look very suspicious...

> ipath_intr.c:62:
> 
> 	u32 __iomem *pbuf;
> 	//...
> 	*pbuf = dwcnt+1; /* no flush required, since already in freeze */
> 
>     pbuf is declared as __iomem, but then you write directly to it in
>     CPU endian.  Should this be a writel() to handle byte-swapping and
>     general IO space stuff properly?

yes, we had an internal bug open on this already...

> Finally, there are a few warnings about symbols shadowing earlier
> declarations.  Most of them look trivial to fix... any objection to
> merging the following for 2.6.25?

no objections, the patch looks perfect, thanks...

arthur



More information about the general mailing list