The for loop in this function increments two variables and has an unusual
starting index of 1 (not 0). Make it look more familiar.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
static void et131x_init_send(struct et131x_adapter *adapter)
{
- u32 ct;
+ int i;
struct tx_ring *tx_ring = &adapter->tx_ring;
struct tcb *tcb = tx_ring->tcb_ring;
memset(tcb, 0, sizeof(struct tcb) * NUM_TCB);
- for (ct = 0; ct++ < NUM_TCB; tcb++)
+ for (i = 0; i < NUM_TCB; i++) {
tcb->next = tcb + 1;
+ tcb++;
+ }
tcb--;
tx_ring->tcb_qtail = tcb;