* [PATCH] staging: octeon-usb: Remove unnecessary assignment
@ 2016-09-21 18:08 Rehas Sachdeva
0 siblings, 0 replies; only message in thread
From: Rehas Sachdeva @ 2016-09-21 18:08 UTC (permalink / raw)
To: outreachy-kernel; +Cc: Greg Kroah-Hartman
Remove 'x=a;' from a consecutive double assignment of the form 'x=a; x=b;'.
Issue detected by the semantic patch found here:
https://github.com/coccinelle/coccinellery/blob/master/write2/write2.cocci
Signed-off-by: Rehas Sachdeva <aquannie@gmail.com>
---
drivers/staging/octeon-usb/octeon-hcd.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/staging/octeon-usb/octeon-hcd.c b/drivers/staging/octeon-usb/octeon-hcd.c
index 17442b3..9a7858a 100644
--- a/drivers/staging/octeon-usb/octeon-hcd.c
+++ b/drivers/staging/octeon-usb/octeon-hcd.c
@@ -3292,7 +3292,6 @@ static int octeon_usb_hub_status_data(struct usb_hcd *hcd, char *buf)
spin_lock_irqsave(&usb->lock, flags);
port_status = cvmx_usb_get_status(usb);
spin_unlock_irqrestore(&usb->lock, flags);
- buf[0] = 0;
buf[0] = port_status.connect_change << 1;
return buf[0] != 0;
--
2.7.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2016-09-21 18:08 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-21 18:08 [PATCH] staging: octeon-usb: Remove unnecessary assignment Rehas Sachdeva
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.