lkml.org 
[lkml]   [2010]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] iop-adma: redundant/wrong tests in iop_*_count()?
From
On Sat, Feb 13, 2010 at 7:54 AM, Roel Kluin <roel.kluin@gmail.com> wrote:
> 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>
> ---
> Or are the tests off by one? Then we'll need a different patch...

No, not off by one, just redundant.

Applied, thanks.

--
Dan


\
 
 \ /
  Last update: 2010-03-01 05:01    [W:0.045 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site