Skip to content

Commit

Permalink
spi/pl022: Explicitly truncate large bitmask
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Mark Brown committed Aug 1, 2014
1 parent 7171511 commit d555ea0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/spi/spi-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit d555ea0

Please sign in to comment.