From: Julia Lawall Date: Tue, 26 Oct 2010 00:25:34 +0000 (+0000) Subject: drivers/net/sb1000.c: delete double assignment X-Git-Tag: firefly_0821_release~7613^2~3442^2~132 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d58c0e95622c0de271ae57c083ad25ff4eb032c8;p=firefly-linux-kernel-4.4.55.git drivers/net/sb1000.c: delete double assignment The other code around these duplicated assignments initializes the 0 1 2 and 3 elements of an array, so change the initialization of the rx_session_id array to do the same. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Julia Lawall Signed-off-by: David S. Miller --- diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index a9ae505e1baf..66c2f1a01963 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c @@ -961,9 +961,9 @@ sb1000_open(struct net_device *dev) lp->rx_error_count = 0; lp->rx_error_dpc_count = 0; lp->rx_session_id[0] = 0x50; - lp->rx_session_id[0] = 0x48; - lp->rx_session_id[0] = 0x44; - lp->rx_session_id[0] = 0x42; + lp->rx_session_id[1] = 0x48; + lp->rx_session_id[2] = 0x44; + lp->rx_session_id[3] = 0x42; lp->rx_frame_id[0] = 0; lp->rx_frame_id[1] = 0; lp->rx_frame_id[2] = 0;