]> git.baikalelectronics.ru Git - kernel.git/commit
iop-adma: redundant/wrong tests in iop_*_count()?
authorRoel Kluin <roel.kluin@gmail.com>
Sat, 13 Feb 2010 14:54:03 +0000 (15:54 +0100)
committerDan Williams <dan.j.williams@intel.com>
Mon, 1 Mar 2010 05:22:12 +0000 (22:22 -0700)
commitce41e8cf0d2a2fc1873c6a18833afba897b9c7b6
treeee42486424fea38a50136f95379b4bc42d0c3d5f
parent53df3b87916437a355d6eb005ffea172af96c48b
iop-adma: redundant/wrong tests in iop_*_count()?

When we reach the loop, len is at least 1, we only stay in the loop when
len is at least MAX_BYTE_COUNT + 1, MAX_BYTE_COUNT is subtracted in each
iteration. So when we leave the loop, or didn't take it, len is at least 1.
Testing whether len is non-zero appears redundant.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
arch/arm/include/asm/hardware/iop3xx-adma.h