Unverified Commit 6d850281 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mark Brown
Browse files

spi: fix SPI_BPW_RANGE_MASK() regression



Geert points out that I confused the min/max arguments that are
reversed between SPI_BPW_RANGE_MASK() and GENMASK(). This time
I have verified the result of the macro after fixing the arguments.

Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Fixes: eefffb42 ("spi: work around clang bug in SPI_BPW_RANGE_MASK()")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 8fcb830a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -444,7 +444,7 @@ struct spi_controller {
	/* bitmask of supported bits_per_word for transfers */
	u32			bits_per_word_mask;
#define SPI_BPW_MASK(bits) BIT((bits) - 1)
#define SPI_BPW_RANGE_MASK(min, max) GENMASK((min) - 1, (max) - 1)
#define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1)

	/* limits on transfer speed */
	u32			min_speed_hz;