Skip to contentSkip to conversation

m68knommu: fix size of address field for 5272 interrupt controller

PATCH New [email protected] 1 participant 1 message Aug 29, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 m68knommu: fix size of address field for 5272 interrupt controller

From: Greg Ungerer <[email protected]>

Picked up by the 0-day buidler:

All warnings:

Quoted 1 line
Quoted 1 line

arch/m68k/coldfire/intc-5272.c:46:20: warning: large integer implicitly truncated to unsigned type [-Woverflow]

     /*MCF_IRQ_EINT1*/ { .icr = MCFSIM_ICR1, .index = 28, .ack = 1, },

...

The problem stems from the changes to make all ColdFire register addresses absolute, in commit d72a5abb ("make remaining ColdFire 5272 register definitions absolute"). That change did not take into account that the addresses were stored as offsets in the irqmap of the intc-5272.c code. Make the field that now stores register addresses big enough to hold addresses.

---
 arch/m68k/coldfire/intc-5272.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/m68k/coldfire/intc-5272.c +1 -1
index d7b6956..d1e2fba 100644
@@ -36,7 +36,7 @@
  * they also need acknowledging via acknowledge bits.
  */
 struct irqmap {
-	unsigned char	icr;
+	unsigned int	icr;
 	unsigned char	index;
 	unsigned char	ack;
 };
Signature · 1 line
1.9.1