On 05/19/2014 06:22 PM, Mark Brown wrote: > On Mon, May 19, 2014 at 05:30:24PM +0200, Valentin Longchamp wrote: >> Or are you talking about the initial memcpy call that fills up the local buffer >> in both rw_trans() and cmd_trans() ? And maybe your second point with the >> scatterlists is about replacing these memcpy calls ? > > We shouldn't need this copy at all and therefore there should be no need > to make sure it is copying into an adequately sized buffer. The only > thing I can think that the memcpy() is for is ensuring that the data is > sent from a physically contiguous buffer but scatter/gather should > handle that. > OK I see your point. The problem is that I currently have no time to write/test a patch that replaces this unnecessary memcpy() to the buffer with scatter/gather, it will have to wait a bit. On the other hand, the patch I have sent fixes a buffer overflow with the current implementation so it could be good to take it if I don't send another patch with the above improvement. Valentin -- To unsubscribe from this list: send the line "unsubscribe linux-spi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html