On Thu, Mar 07, 2019 at 11:56:07AM +0100, Arnd Bergmann wrote: > Link: https://bugs.llvm.org/show_bug.cgi?id=38789 > #define SPI_BPW_MASK(bits) BIT((bits) - 1) > -#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_BIT_MASK(bits) ((BIT((bits) - 1) << 1) - 1) > +#define SPI_BPW_RANGE_MASK(min, max) (SPI_BIT_MASK(max) - (BIT((min) - 1) - 1)) Can we have a comment that this is for the clang warning please so nobody goes in and simplifies the code?
Attachment:
signature.asc
Description: PGP signature