Commit 644bbf95 authored by Mark Einon's avatar Mark Einon Committed by Greg Kroah-Hartman

staging: et131x: Simplify for loop in et131x_init_send()

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: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarMark Einon <mark.einon@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ccb32b13
......@@ -1751,7 +1751,7 @@ static void et131x_disable_txrx(struct net_device *netdev)
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;
......@@ -1759,8 +1759,10 @@ static void et131x_init_send(struct et131x_adapter *adapter)
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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment