Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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/)

// <smpl>
@@
expression i;
@@

*i = ...;
i = ...;
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Julia Lawall and committed by
David S. Miller
d58c0e95 0184bbba

+3 -3
+3 -3
drivers/net/sb1000.c
··· 961 961 lp->rx_error_count = 0; 962 962 lp->rx_error_dpc_count = 0; 963 963 lp->rx_session_id[0] = 0x50; 964 - lp->rx_session_id[0] = 0x48; 965 - lp->rx_session_id[0] = 0x44; 966 - lp->rx_session_id[0] = 0x42; 964 + lp->rx_session_id[1] = 0x48; 965 + lp->rx_session_id[2] = 0x44; 966 + lp->rx_session_id[3] = 0x42; 967 967 lp->rx_frame_id[0] = 0; 968 968 lp->rx_frame_id[1] = 0; 969 969 lp->rx_frame_id[2] = 0;