]> git.baikalelectronics.ru Git - kernel.git/commit
lib/checksum.c: optimize do_csum a bit
authorIan Abbott <abbotti@mev.co.uk>
Thu, 7 Jul 2011 01:18:49 +0000 (01:18 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 7 Jul 2011 11:52:24 +0000 (04:52 -0700)
commitd486ea42c9099c37702ea2f7942ec776a594dd25
tree75083bdb5b5d9e266b0c632406d67f69505d527c
parent833b2c83964029f21dcbb672d9a59d27b4f7e20e
lib/checksum.c: optimize do_csum a bit

Reduce the number of variables modified by the loop in do_csum() by 1,
which seems like a good idea.  On Nios II (a RISC CPU with 3-operand
instruction set) it reduces the loop from 7 to 6 instructions, including
the conditional branch.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
lib/checksum.c