summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-pl022.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-08-01 17:47:38 +0100
committerMark Brown <broonie@linaro.org>2014-08-01 18:24:37 +0100
commitd555ea05f9d8ebf567eaa6b4e4cb5776aacf2940 (patch)
tree04c2d993a28d78b78603cb67a85e70e9e8916979 /drivers/spi/spi-pl022.c
parent7171511eaec5bf23fb06078f59784a3a0626b38f (diff)
downloadlwn-d555ea05f9d8ebf567eaa6b4e4cb5776aacf2940.tar.gz
lwn-d555ea05f9d8ebf567eaa6b4e4cb5776aacf2940.zip
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>
Diffstat (limited to 'drivers/spi/spi-pl022.c')
-rw-r--r--drivers/spi/spi-pl022.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index 66d2ae21e78e..1189cfd96477 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -1417,7 +1417,7 @@ static void do_interrupt_dma_transfer(struct pl022 *pl022)
* Default is to enable all interrupts except RX -
* this will be enabled once TX is complete
*/
- u32 irqflags = ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM;
+ u32 irqflags = (u32)(ENABLE_ALL_INTERRUPTS & ~SSP_IMSC_MASK_RXIM);
/* Enable target chip, if not already active */
if (!pl022->next_msg_cs_active)