[PATCH] spi: bcm2835: enable dma modes for transfers meeting certain conditions

Martin Sperl kernel at martin.sperl.org
Mon May 11 12:38:56 PDT 2015

> On 11.05.2015, at 20:24, Mark Brown <broonie at kernel.org> wrote:
> Applied, thanks.

Found one typo with the logic - it only does one specific
check for TX twice instead of for rx_buf and tx_buf:
	if (((u32)tfr->tx_buf % 4 == 0) && ((u32)tfr->tx_buf % 4 == 0))

On top there have been some build-reports about SZ_4K not being defined
so I guess that there is an include <linux/sizes.h> missing.

as well as a warning about a pointer cast to u32 on 64 bit systems.
	if (((u32)tfr->tx_buf % 4 == 0) && ((u32)tfr->tx_buf % 4 == 0))
	if (((u32)tfr->rx_buf % SZ_4K) + tfr->len > SZ_4K) {
I assume fixable by using size_t instead of u32.

Do you want me to send a patch to fix those, or shall I resend the full
patch with those issues fixed?

Sorry for the inconvenience


More information about the linux-rpi-kernel mailing list