aboutsummaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/cell/interrupt.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2006-10-04 17:26:24 +0200
committerPaul Mackerras <paulus@samba.org>2006-10-05 09:21:02 +1000
commit43b4f4061cf54aa225a1e94a969450ccf5305cd9 (patch)
treecef8ed4fe2ca1019509e585bf4dcaab04236bcaf /arch/powerpc/platforms/cell/interrupt.c
parentf7e2ce788677ca0996d360202b91524db894c7b2 (diff)
[POWERPC] cell: fix bugs found by sparse
- Some long constants should be marked 'ul'. - When using desc->handler_data to pass an __iomem register area, we need to add casts to and from __iomem. Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/platforms/cell/interrupt.c')
-rw-r--r--arch/powerpc/platforms/cell/interrupt.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/cell/interrupt.c b/arch/powerpc/platforms/cell/interrupt.c
index 6cc59e0b458..8533f13a5ed 100644
--- a/arch/powerpc/platforms/cell/interrupt.c
+++ b/arch/powerpc/platforms/cell/interrupt.c
@@ -101,7 +101,7 @@ static void iic_ioexc_eoi(unsigned int irq)
static void iic_ioexc_cascade(unsigned int irq, struct irq_desc *desc,
struct pt_regs *regs)
{
- struct cbe_iic_regs *node_iic = desc->handler_data;
+ struct cbe_iic_regs __iomem *node_iic = (void __iomem *)desc->handler_data;
unsigned int base = (irq & 0xffffff00) | IIC_IRQ_TYPE_IOEXC;
unsigned long bits, ack;
int cascade;
@@ -320,7 +320,7 @@ static int __init setup_iic(void)
struct device_node *dn;
struct resource r0, r1;
unsigned int node, cascade, found = 0;
- struct cbe_iic_regs *node_iic;
+ struct cbe_iic_regs __iomem *node_iic;
const u32 *np;
for (dn = NULL;
@@ -357,7 +357,11 @@ static int __init setup_iic(void)
cascade = irq_create_mapping(iic_host, cascade);
if (cascade == NO_IRQ)
continue;
- set_irq_data(cascade, node_iic);
+ /*
+ * irq_data is a generic pointer that gets passed back
+ * to us later, so the forced cast is fine.
+ */
+ set_irq_data(cascade, (void __force *)node_iic);
set_irq_chained_handler(cascade , iic_ioexc_cascade);
out_be64(&node_iic->iic_ir,
(1 << 12) /* priority */ |