* [PATCH][V2] usb: gadget: pxa27x: Remove redundant assignment to is_short and dev
@ 2017-11-07 14:39 Colin King
2017-11-07 18:46 ` Robert Jarzmik
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-07 14:39 UTC (permalink / raw)
To: Daniel Mack, Haojian Zhuang, Robert Jarzmik, Felipe Balbi,
Greg Kroah-Hartman, linux-arm-kernel, linux-usb
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
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
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/usb/gadget/udc/pxa27x_udc.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/usb/gadget/udc/pxa27x_udc.c b/drivers/usb/gadget/udc/pxa27x_udc.c
index 14606f340325..d88e56cce56d 100644
--- a/drivers/usb/gadget/udc/pxa27x_udc.c
+++ b/drivers/usb/gadget/udc/pxa27x_udc.c
@@ -984,8 +984,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",
@@ -1139,7 +1137,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;
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH][V2] usb: gadget: pxa27x: Remove redundant assignment to is_short and dev
2017-11-07 14:39 [PATCH][V2] usb: gadget: pxa27x: Remove redundant assignment to is_short and dev Colin King
@ 2017-11-07 18:46 ` Robert Jarzmik
0 siblings, 0 replies; 2+ messages in thread
From: Robert Jarzmik @ 2017-11-07 18:46 UTC (permalink / raw)
To: Colin King
Cc: Daniel Mack, Haojian Zhuang, Felipe Balbi, Greg Kroah-Hartman,
linux-arm-kernel, linux-usb, kernel-janitors, linux-kernel
Colin King <colin.king@canonical.com> writes:
> From: Colin Ian King <colin.king@canonical.com>
>
> 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>
Cheers.
--
Robert
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-07 18:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-07 14:39 [PATCH][V2] usb: gadget: pxa27x: Remove redundant assignment to is_short and dev Colin King
2017-11-07 18:46 ` Robert Jarzmik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).