[PATCH v3 4/8] spi: core: added spi_split_transfers_unaligned

Martin Sperl kernel at martin.sperl.org
Wed Dec 16 08:11:17 PST 2015


> On 14.12.2015, at 16:20, kernel at martin.sperl.org wrote:
> +	/* the number of bytes by which we need to shift to align */
> +	alignment_shift = BIT(alignment) - alignment_to_correct;

This actually needs to be:
	alignment_shift = alignment - alignment_to_correct

> +
> +	/* calculate the values */
> +	alignment_mask = (1 << alignment) - 1;
This actually needs to be:
	 alignment_mask = alignment - 1

This was due to a misconception of @spi_master.dma_alignment...

I will wait for other feedback before creating v4 of the
patchset.

Martin



More information about the linux-rpi-kernel mailing list