Re: [PATCH] Staging/comedi: Fixes static analysis warning raised by sparse

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

 



On Tue, Jun 10, 2014 at 10:36:13PM +0000, Hartley Sweeten wrote:
> On Monday, June 09, 2014 10:48 PM, Dan Carpenter wrote:
> > On Mon, Jun 09, 2014 at 09:24:35PM -0400, Marcos A. Di Pietro wrote:
> >> Fixes warning static analysis warning raised by sparse in drivers/staging/comedi/drivers/ni_stc.h
> >> 
> >> warning: shift too big (4294967295) for type int
> >
> > This warning seems wrong.  I don't even understand how it thinks the
> > shift is too big. The patch doesn't make sense and it introduces a bug.
> 
> The warning is a bit annoying and I also haven't figured out why sparse
> thinks the shift is too big.

I can't figure out how to reproduce this Sparse warning.  I compiled
drivers/staging/comedi/drivers/ni_mio_cs.c and it doesn't have it.
I double checked by doing a
`make drivers/staging/comedi/drivers/ni_mio_cs.i` that the
ni_stc_dma_channel_select_bitfield is not ifdeffed out.

Which version of Sparse are you using?  Really the correct thing is to
fix Sparse.

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux