staging: et131x: Avoid unnecessary calculations in for loop
authorMark Einon <mark.einon@gmail.com>
Mon, 12 Nov 2012 21:16:28 +0000 (21:16 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Nov 2012 23:06:46 +0000 (15:06 -0800)
commit87648933116f528b3cda64c4d80d9577277fe4f0
treec26ef4790a52bb69cab16096411968c4b0f6399d
parent9d10b221264b9383fcf8e8628f89e9859c05599d
staging: et131x: Avoid unnecessary calculations in for loop

In et131x_rx_dma_memory_alloc(), we loop over fbr_entries - the values of
fbr_align and fbr_chunksize calculated in the loop do not depend on the
loop counter and are the same for all loop iterations.

Take the calculations of these values out of the loop, as we only
need to calculate them once per loop, not once per loop iteration.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/et131x/et131x.c