[PATCH] mmci: calculate remaining bytes at error correctly
Russell King - ARM Linux
linux at arm.linux.org.uk
Thu Jan 27 11:47:26 EST 2011
On Thu, Jan 27, 2011 at 05:43:35PM +0100, Linus Walleij wrote:
> 2011/1/27 Russell King - ARM Linux <linux at arm.linux.org.uk>:
>
> > So, maybe we want:
> >
> > host->data_xfered = ((success - 1) / data->blksz) * data->blksz;
> >
> > instead?
>
> So like this:
Yes, that looks right, and shouldn't ever underflow.
More information about the linux-arm-kernel
mailing list