summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-11-07 14:39:14 +0000
committerFelipe Balbi <felipe.balbi@linux.intel.com>2017-12-11 12:36:51 +0200
commit71a9fda36829273eac4770dd539c80303969c5d8 (patch)
tree0ec25d24ebfc7788979cda5edbc0f09fbfa3991e /drivers
parent1fd4c45d6cd39a09bd8c7cbd57a7e83da97b51bf (diff)
usb: gadget: pxa27x: Remove redundant assignment to is_short and dev
Variable is_short is set to zero but this value is never read as it is overwritten with a new value later on, hence it is a redundant assignment and can be removed. Pointer dev is assigned a value that is not read and it is updated a few statements later, this too is redundant and can be removed. Cleans up clan warnings: drivers/usb/gadget/udc/pxa27x_udc.c:986:3: warning: Value stored to 'is_short' is never read drivers/usb/gadget/udc/pxa27x_udc.c:1141:2: warning: Value stored to 'dev' is never read Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/gadget/udc/pxa27x_udc.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index be2761f1b3f5..fadcf2653c3d 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -979,8 +979,6 @@ static int write_fifo(struct pxa_ep *ep, struct pxa27x_request *req)
max = ep->fifo_size;
do {
- is_short = 0;
-
udccsr = udc_ep_readl(ep, UDCCSR);
if (udccsr & UDCCSR_PC) {
ep_vdbg(ep, "Clearing Transmit Complete, udccsr=%x\n",
@@ -1134,7 +1132,6 @@ static int pxa_ep_queue(struct usb_ep *_ep, struct usb_request *_req,
if (unlikely(!_ep))
return -EINVAL;
- dev = udc_usb_ep->dev;
ep = udc_usb_ep->pxa_ep;
if (unlikely(!ep))
return -EINVAL;