summaryrefslogtreecommitdiff
path: root/hw/arm/pxa2xx_pic.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2014-03-10 14:56:29 +0000
committerPeter Maydell <peter.maydell@linaro.org>2014-03-10 14:56:29 +0000
commit43a32ed68f3aac5ccde4fa6fa4a158e9e8153c94 (patch)
treef3e9c323d3892f6d2361e6e9450065f67dd310cc /hw/arm/pxa2xx_pic.c
parentb29c8f115de5f48f0019afc2c779cf64e5fcefaf (diff)
downloadqemu-43a32ed68f3aac5ccde4fa6fa4a158e9e8153c94.tar.gz
pxa2xx: Don't shift into sign bit
Add missing 'U' suffixes to avoid potentially shifting into the sign bit of a signed integer. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1392988008-15938-2-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'hw/arm/pxa2xx_pic.c')
-rw-r--r--hw/arm/pxa2xx_pic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/arm/pxa2xx_pic.c b/hw/arm/pxa2xx_pic.c
index 345fa4a491..d37fb543e8 100644
--- a/hw/arm/pxa2xx_pic.c
+++ b/hw/arm/pxa2xx_pic.c
@@ -105,7 +105,7 @@ static inline uint32_t pxa2xx_pic_highest(PXA2xxPICState *s) {
for (i = PXA2XX_PIC_SRCS - 1; i >= 0; i --) {
irq = s->priority[i] & 0x3f;
- if ((s->priority[i] & (1 << 31)) && irq < PXA2XX_PIC_SRCS) {
+ if ((s->priority[i] & (1U << 31)) && irq < PXA2XX_PIC_SRCS) {
/* Source peripheral ID is valid. */
bit = 1 << (irq & 31);
int_set = (irq >= 32);
@@ -119,7 +119,7 @@ static inline uint32_t pxa2xx_pic_highest(PXA2xxPICState *s) {
if (mask[int_set] & bit & ~s->is_fiq[int_set]) {
/* IRQ asserted */
ichp &= 0x0000ffff;
- ichp |= (1 << 31) | (irq << 16);
+ ichp |= (1U << 31) | (irq << 16);
}
}
}