Re: [PATCH] atmel_spi: fix dma addr calculation for len >BUFFER_SIZE

From: Haavard Skinnemoen
Date: Tue Sep 29 2009 - 02:58:49 EST


Ben Nizette <bn@xxxxxxxxxxxxxxx> wrote:
> From: Ben Nizette <bn@xxxxxxxxxxxxxxx>
> Subject: [PATCH] atmel_spi: make "len" variable name less ambiguous in dma addr calculation
>
> "[PATCH] atmel_spi: fix dma addr calculation for len > BUFFER_SIZE"
> fixed a bug where the "len" variable in atmel_spi_next_xfer_data() was
> taken to be the total number of bytes remaining in the transfer but it
> actually represents the number of bytes which will be sent this dma
> chunk. While the 2 will be the same if there is less than 1 chunk to go
> (or if we aren't using a scratch buffer and therefore aren't breaking
> the transfers in to chunks), they won't be the same in general.
>
> s/len/next_len to reflect the true nature and usage of this variable.
>
> Signed-off-by: Ben Nizette <bn@xxxxxxxxxxxxxxx>

Excellent, thanks.

Acked-by: Haavard Skinnemoen <haavard.skinnemoen@xxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/