]> Git Repo - linux.git/commitdiff
spi: fix SPI_BPW_RANGE_MASK() regression
authorArnd Bergmann <[email protected]>
Wed, 13 Mar 2019 21:00:34 +0000 (22:00 +0100)
committerMark Brown <[email protected]>
Thu, 14 Mar 2019 15:52:33 +0000 (15:52 +0000)
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 <[email protected]>
Fixes: eefffb42f665 ("spi: work around clang bug in SPI_BPW_RANGE_MASK()")
Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
include/linux/spi/spi.h

index b27386450089135ace7e2f3583c742396b554c3f..a0975cf76cf619679c5b83b00350905972d8a14a 100644 (file)
@@ -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;
This page took 0.057118 seconds and 4 git commands to generate.