[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <25e057c00902080859w3d9973a1u1e73450d37e20459@mail.gmail.com>
Date: Sun, 8 Feb 2009 17:59:10 +0100
From: roel kluin <roel.kluin@...il.com>
To: David Brownell <david-b@...bell.net>
Cc: spi-devel-general@...ts.sourceforge.net,
lkml <linux-kernel@...r.kernel.org>,
Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: pxa2xx_spi: spi_bfin5xx: limit reaches -1 rather than 0
2009/2/8 David Brownell <david-b@...bell.net>:
> On Sunday 08 February 2009, Roel Kluin wrote:
>> vi drivers/spi/pxa2xx_spi.c +919
>> vi drivers/spi/spi_bfin5xx.c +645
>>
>> if (flush(drv_data) == 0) {
>> dev_err(&drv_data->pdev->dev, "pump_transfers: flush failed\n");
>> message->status = -EIO;
>> giveback(drv_data);
>> return;
>> }
>>
>> But with a postfix decrement limit reaches -1 rather than 0.
>>
>> Signed-off-by: Roel Kluin <roel.kluin@...il.com>
>
> Acked-by: David Brownell <dbrownell@...rs.sourceforge.net>
could you please review the patch at http://lkml.org/lkml/2009/2/8/72
instead? I initially overlooked two similar issues in the same file.
> Although, note that if the *actual* count mattered here,
> the correect patch would be to test "flush() < 0)" ...
> except when using a "do {...} while (--limit)" idiom.
True. You can also increase the limit with 1 when changing post- to
prefix for the while (--limit) {...} idiom.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists