* [PATCH] USB: wusbcore: remove redundant re-assignment to pointer 'dev'
@ 2018-01-26 15:07 Colin King
2018-01-27 5:16 ` Johan Hovold
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2018-01-26 15:07 UTC (permalink / raw)
To: Greg Kroah-Hartman, Felipe Balbi, Johan Hovold, linux-usb
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Pointer dev is initialized and then re-assigned with the same value
a little later, hence the second assignment is redundant and can be
removed.
Cleans up clang warning:
drivers/usb/wusbcore/wa-nep.c:88:17: warning: Value stored to 'dev'
during its initialization is never read
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/usb/wusbcore/wa-nep.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/usb/wusbcore/wa-nep.c b/drivers/usb/wusbcore/wa-nep.c
index 9fdcb6b84abf..5f0656db5482 100644
--- a/drivers/usb/wusbcore/wa-nep.c
+++ b/drivers/usb/wusbcore/wa-nep.c
@@ -93,7 +93,6 @@ static void wa_notif_dispatch(struct work_struct *ws)
goto out; /* screw it */
#endif
atomic_dec(&wa->notifs_queued); /* Throttling ctl */
- dev = &wa->usb_iface->dev;
size = nw->size;
itr = nw->data;
--
2.15.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] USB: wusbcore: remove redundant re-assignment to pointer 'dev'
2018-01-26 15:07 [PATCH] USB: wusbcore: remove redundant re-assignment to pointer 'dev' Colin King
@ 2018-01-27 5:16 ` Johan Hovold
0 siblings, 0 replies; 2+ messages in thread
From: Johan Hovold @ 2018-01-27 5:16 UTC (permalink / raw)
To: Colin King
Cc: Greg Kroah-Hartman, Felipe Balbi, Johan Hovold, linux-usb,
kernel-janitors, linux-kernel
On Fri, Jan 26, 2018 at 03:07:12PM +0000, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Pointer dev is initialized and then re-assigned with the same value
> a little later, hence the second assignment is redundant and can be
> removed.
>
> Cleans up clang warning:
> drivers/usb/wusbcore/wa-nep.c:88:17: warning: Value stored to 'dev'
> during its initialization is never read
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Johan Hovold <johan@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-01-27 5:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-26 15:07 [PATCH] USB: wusbcore: remove redundant re-assignment to pointer 'dev' Colin King
2018-01-27 5:16 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox