]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit4c4852d7153304973c67de1020c71c369d92a68b
treec26ef4790a52bb69cab16096411968c4b0f6399d
parentd9ea09953cc83ebdf57566dad3f9754798c4216b
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