Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

spi/pl022: Explicitly truncate large bitmask

When building on 64 bit architectures the use of bitwise negation generates
constants larger than 32 bits which won't fit in u32s used to represent
32 bit register values on the device. Explicitly cast to let the compiler
know that the higher bits are not significant and can be discarded.

Signed-off-by: Mark Brown <broonie@linaro.org>

+1 -1
+1 -1
drivers/spi/spi-pl022.c
··· 1417 1417 * Default is to enable all interrupts except RX - 1418 1418 * this will be enabled once TX is complete 1419 1419 */ 1420 - u32 irqflags = ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM; 1420 + u32 irqflags = (u32)(ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM); 1421 1421 1422 1422 /* Enable target chip, if not already active */ 1423 1423 if (!pl022->next_msg_cs_active)