Re: Applied "spi: work around clang bug in SPI_BPW_RANGE_MASK()" to the spi tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 13, 2019 at 8:15 PM Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> wrote:

> > -#define SPI_BIT_MASK(bits) (((bits) == 32) ? ~0U : (BIT(bits) - 1))
> > -#define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - SPI_BIT_MASK(min - 1))
> > +#define SPI_BPW_RANGE_MASK(min, max) GENMASK((min) - 1, (max) - 1)
>
> This is not correct: GENMASK() order is from msb to lsb.
> So it should it:
>
> +#define SPI_BPW_RANGE_MASK(min, max) GENMASK((max) - 1, (min) - 1)

Sorry about the mess, I've sent a fixup now.

       Arnd



[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux