aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/net2272.c
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2013-03-21 06:19:31 -0400
committerFelipe Balbi <balbi@ti.com>2013-03-27 07:18:57 -0400
commit69147121abf569bf3655a2000c6511f1f016d9f8 (patch)
tree36d1bf35b9dc0a2ca7399da7984ed99e27aac572 /drivers/usb/gadget/net2272.c
parent60630c2eabd40fb119a1b88af364003d2915b370 (diff)
usb: gadget: net2272: fix sparse warnings
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@ti.com>
Diffstat (limited to 'drivers/usb/gadget/net2272.c')
-rw-r--r--drivers/usb/gadget/net2272.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/usb/gadget/net2272.c b/drivers/usb/gadget/net2272.c
index 03e41049ed30..ce450a18aa19 100644
--- a/drivers/usb/gadget/net2272.c
+++ b/drivers/usb/gadget/net2272.c
@@ -911,7 +911,7 @@ net2272_queue(struct usb_ep *_ep, struct usb_request *_req, gfp_t gfp_flags)
911 } 911 }
912 } 912 }
913 } 913 }
914 if (likely(req != 0)) 914 if (likely(req))
915 list_add_tail(&req->queue, &ep->queue); 915 list_add_tail(&req->queue, &ep->queue);
916 916
917 if (likely(!list_empty(&ep->queue))) 917 if (likely(!list_empty(&ep->queue)))
@@ -1538,7 +1538,7 @@ net2272_handle_dma(struct net2272_ep *ep)
1538 | (ep->dev->dma_eot_polarity << EOT_POLARITY) 1538 | (ep->dev->dma_eot_polarity << EOT_POLARITY)
1539 | (ep->dev->dma_dack_polarity << DACK_POLARITY) 1539 | (ep->dev->dma_dack_polarity << DACK_POLARITY)
1540 | (ep->dev->dma_dreq_polarity << DREQ_POLARITY) 1540 | (ep->dev->dma_dreq_polarity << DREQ_POLARITY)
1541 | ((ep->dma >> 1) << DMA_ENDPOINT_SELECT)); 1541 | (ep->dma << DMA_ENDPOINT_SELECT));
1542 1542
1543 ep->dev->dma_busy = 0; 1543 ep->dev->dma_busy = 0;
1544 1544
@@ -1611,7 +1611,7 @@ net2272_handle_ep(struct net2272_ep *ep)
1611 ep->irqs++; 1611 ep->irqs++;
1612 1612
1613 dev_vdbg(ep->dev->dev, "%s ack ep_stat0 %02x, ep_stat1 %02x, req %p\n", 1613 dev_vdbg(ep->dev->dev, "%s ack ep_stat0 %02x, ep_stat1 %02x, req %p\n",
1614 ep->ep.name, stat0, stat1, req ? &req->req : 0); 1614 ep->ep.name, stat0, stat1, req ? &req->req : NULL);
1615 1615
1616 net2272_ep_write(ep, EP_STAT0, stat0 & 1616 net2272_ep_write(ep, EP_STAT0, stat0 &
1617 ~((1 << NAK_OUT_PACKETS) 1617 ~((1 << NAK_OUT_PACKETS)