On Thu, Mar 21, 2013 at 10:59:47AM -0400, Alan Stern wrote: > On Thu, 21 Mar 2013, Felipe Balbi wrote: > > > Fix the following sparse warnings: > > > > drivers/usb/gadget/net2272.c:916:13: warning: Using plain integer as NULL pointer > > drivers/usb/gadget/net2272.c:1624:9: warning: Using plain integer as NULL pointer > > drivers/usb/gadget/net2272.c:1552:30: warning: right shift by bigger than source value > > > > Note that the last warning is an actual bug, > > since ep->dma is a one bit value which is > > shifted by one bit in code. > > > > Signed-off-by: Felipe Balbi <balbi@xxxxxx> > > --- > > > > Hi Alan, > > > > found this when building drivers/usb/gadget/ with sparse > > checks. I'm only concerned about the second hunk. Do > > you think it's correct ? I don't have HW to test neither > > do I have documentation to read. > > I don't have hardware or documentation either. > > > @@ -1549,7 +1549,7 @@ net2272_handle_dma(struct net2272_ep *ep) > > | (ep->dev->dma_eot_polarity << EOT_POLARITY) > > | (ep->dev->dma_dack_polarity << DACK_POLARITY) > > | (ep->dev->dma_dreq_polarity << DREQ_POLARITY) > > - | ((ep->dma >> 1) << DMA_ENDPOINT_SELECT)); > > + | (ep->dma << DMA_ENDPOINT_SELECT)); > > I don't know what was intended here. The most likely possibility is > that the right shift was just a mistake, in which case your fix is the > right one. should we push it ? Would be awesome if someone from PLX could provide HW and documentation for us. I'd be more than happy to help maintaining this driver and net2280 on my free time whenever I do these huge cleanups all over the gadget framework. Greg, do you think you can arrange something through Linux Driver Project ? cheers -- balbi
Attachment:
signature.asc
Description: Digital signature