Commit ecc8edbf6995558d8a47b43ac6645840c98a7b95
Committed by
Marek Vasut
1 parent
81c065d2a0
Exists in
master
and in
53 other branches
usb: pxa27x_udc: fix compiler warnings
Newer gcc versions warn about unused variables. This patch corrects a few of those warnings that popped up in a build for the palmtreo680 board. Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
Showing 1 changed file with 5 additions and 9 deletions Side-by-side Diff
drivers/usb/gadget/pxa27x_udc.c
... | ... | @@ -151,7 +151,7 @@ |
151 | 151 | struct urb *urb = endpoint->rcv_urb; |
152 | 152 | int ep_num = endpoint->endpoint_address & USB_ENDPOINT_NUMBER_MASK; |
153 | 153 | u32 *data32 = (u32 *) urb->buffer; |
154 | - unsigned int i, n, is_short ; | |
154 | + unsigned int i, n; | |
155 | 155 | |
156 | 156 | usbdbg("read urb on ep %d", ep_num); |
157 | 157 | #if defined(USBDDBG) && defined(USBDPARANOIA) |
158 | 158 | |
... | ... | @@ -165,9 +165,8 @@ |
165 | 165 | n = readl(UDCBCN(ep_num)) & 0x3ff; |
166 | 166 | else /* zlp */ |
167 | 167 | n = 0; |
168 | - is_short = n != endpoint->rcv_packetSize; | |
169 | 168 | |
170 | - usbdbg("n %d%s", n, is_short ? "-s" : ""); | |
169 | + usbdbg("n %d%s", n, n != endpoint->rcv_packetSize ? "-s" : ""); | |
171 | 170 | for (i = 0; i < n; i += 4) |
172 | 171 | data32[urb->actual_length / 4 + i / 4] = readl(UDCDN(ep_num)); |
173 | 172 | |
174 | 173 | |
175 | 174 | |
... | ... | @@ -402,16 +401,13 @@ |
402 | 401 | |
403 | 402 | static void udc_state_changed(void) |
404 | 403 | { |
405 | - int config, interface, alternate; | |
406 | 404 | |
407 | 405 | writel(readl(UDCCR) | UDCCR_SMAC, UDCCR); |
408 | 406 | |
409 | - config = (readl(UDCCR) & UDCCR_ACN) >> UDCCR_ACN_S; | |
410 | - interface = (readl(UDCCR) & UDCCR_AIN) >> UDCCR_AIN_S; | |
411 | - alternate = (readl(UDCCR) & UDCCR_AAISN) >> UDCCR_AAISN_S; | |
412 | - | |
413 | 407 | usbdbg("New UDC settings are: conf %d - inter %d - alter %d", |
414 | - config, interface, alternate); | |
408 | + (readl(UDCCR) & UDCCR_ACN) >> UDCCR_ACN_S, | |
409 | + (readl(UDCCR) & UDCCR_AIN) >> UDCCR_AIN_S, | |
410 | + (readl(UDCCR) & UDCCR_AAISN) >> UDCCR_AAISN_S); | |
415 | 411 | |
416 | 412 | usbd_device_event_irq(udc_device, DEVICE_CONFIGURED, 0); |
417 | 413 | writel(UDCISR1_IRCC, UDCISR1); |