Commit d58fcf81 authored by Michal Nazarewicz's avatar Michal Nazarewicz Committed by Felipe Balbi

usb: gadget: m66592: fix unused-but-set-variable warnings

This patch fixes the following (W=1) warnings:

drivers/usb/gadget/udc/m66592-udc.c: In function ‘m66592_irq’:
drivers/usb/gadget/udc/m66592-udc.c:1203:15: warning: variable ‘nrdyenb’ set but not used [-Wunused-but-set-variable]
  u16 brdyenb, nrdyenb, bempenb;
               ^
drivers/usb/gadget/udc/m66592-udc.c:1202:15: warning: variable ‘nrdysts’ set but not used [-Wunused-but-set-variable]
  u16 brdysts, nrdysts, bempsts;
               ^

In doing so, it removes calls to m66592_read function which does I/O
with the device, but I hope the reads don’t have any side effects that
are needed.
Signed-off-by: default avatarMichal Nazarewicz <mina86@mina86.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
parent 872ce511
...@@ -1199,8 +1199,6 @@ static irqreturn_t m66592_irq(int irq, void *_m66592) ...@@ -1199,8 +1199,6 @@ static irqreturn_t m66592_irq(int irq, void *_m66592)
struct m66592 *m66592 = _m66592; struct m66592 *m66592 = _m66592;
u16 intsts0; u16 intsts0;
u16 intenb0; u16 intenb0;
u16 brdysts, nrdysts, bempsts;
u16 brdyenb, nrdyenb, bempenb;
u16 savepipe; u16 savepipe;
u16 mask0; u16 mask0;
...@@ -1224,12 +1222,10 @@ static irqreturn_t m66592_irq(int irq, void *_m66592) ...@@ -1224,12 +1222,10 @@ static irqreturn_t m66592_irq(int irq, void *_m66592)
mask0 = intsts0 & intenb0; mask0 = intsts0 & intenb0;
if (mask0) { if (mask0) {
brdysts = m66592_read(m66592, M66592_BRDYSTS); u16 brdysts = m66592_read(m66592, M66592_BRDYSTS);
nrdysts = m66592_read(m66592, M66592_NRDYSTS); u16 bempsts = m66592_read(m66592, M66592_BEMPSTS);
bempsts = m66592_read(m66592, M66592_BEMPSTS); u16 brdyenb = m66592_read(m66592, M66592_BRDYENB);
brdyenb = m66592_read(m66592, M66592_BRDYENB); u16 bempenb = m66592_read(m66592, M66592_BEMPENB);
nrdyenb = m66592_read(m66592, M66592_NRDYENB);
bempenb = m66592_read(m66592, M66592_BEMPENB);
if (mask0 & M66592_VBINT) { if (mask0 & M66592_VBINT) {
m66592_write(m66592, 0xffff & ~M66592_VBINT, m66592_write(m66592, 0xffff & ~M66592_VBINT,
...@@ -1408,28 +1404,20 @@ static int m66592_dequeue(struct usb_ep *_ep, struct usb_request *_req) ...@@ -1408,28 +1404,20 @@ static int m66592_dequeue(struct usb_ep *_ep, struct usb_request *_req)
static int m66592_set_halt(struct usb_ep *_ep, int value) static int m66592_set_halt(struct usb_ep *_ep, int value)
{ {
struct m66592_ep *ep; struct m66592_ep *ep = container_of(_ep, struct m66592_ep, ep);
struct m66592_request *req;
unsigned long flags; unsigned long flags;
int ret = 0; int ret = 0;
ep = container_of(_ep, struct m66592_ep, ep);
req = list_entry(ep->queue.next, struct m66592_request, queue);
spin_lock_irqsave(&ep->m66592->lock, flags); spin_lock_irqsave(&ep->m66592->lock, flags);
if (!list_empty(&ep->queue)) { if (!list_empty(&ep->queue)) {
ret = -EAGAIN; ret = -EAGAIN;
goto out; } else if (value) {
}
if (value) {
ep->busy = 1; ep->busy = 1;
pipe_stall(ep->m66592, ep->pipenum); pipe_stall(ep->m66592, ep->pipenum);
} else { } else {
ep->busy = 0; ep->busy = 0;
pipe_stop(ep->m66592, ep->pipenum); pipe_stop(ep->m66592, ep->pipenum);
} }
out:
spin_unlock_irqrestore(&ep->m66592->lock, flags); spin_unlock_irqrestore(&ep->m66592->lock, flags);
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment