All of lore.kernel.org
 help / color / mirror / Atom feed
* [MIPS] Fix compiler warnings in arch/mips/sibyte/bcm1480/irq.c
@ 2006-02-20  4:57 Martin Michlmayr
  2006-02-20 11:09 ` Ralf Baechle
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Michlmayr @ 2006-02-20  4:57 UTC (permalink / raw)
  To: Ralf Baechle; +Cc: linux-mips, mark.e.mason

Fix the following compiler warnings:

  CC      arch/mips/sibyte/bcm1480/irq.o
arch/mips/sibyte/bcm1480/irq.c: In function ‘bcm1480_set_affinity’:
arch/mips/sibyte/bcm1480/irq.c:168: warning: ISO C90 forbids mixed declarations and code
arch/mips/sibyte/bcm1480/irq.c: In function ‘ack_bcm1480_irq’:
arch/mips/sibyte/bcm1480/irq.c:230: warning: ISO C90 forbids mixed declarations and code

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>


--- a/arch/mips/sibyte/bcm1480/irq.c	2006-02-20 04:51:41.000000000 +0000
+++ b/arch/mips/sibyte/bcm1480/irq.c	2006-02-20 04:52:39.000000000 +0000
@@ -139,7 +139,7 @@
 #ifdef CONFIG_SMP
 static void bcm1480_set_affinity(unsigned int irq, cpumask_t mask)
 {
-	int i = 0, old_cpu, cpu, int_on;
+	int i = 0, old_cpu, cpu, int_on, k;
 	u64 cur_ints;
 	irq_desc_t *desc = irq_desc + irq;
 	unsigned long flags;
@@ -165,7 +165,6 @@
 		irq_dirty -= BCM1480_NR_IRQS_HALF;
 	}
 
-	int k;
 	for (k=0; k<2; k++) { /* Loop through high and low interrupt mask register */
 		cur_ints = ____raw_readq(IOADDR(A_BCM1480_IMR_MAPPER(old_cpu) + R_BCM1480_IMR_INTERRUPT_MASK_H + (k*BCM1480_IMR_HL_SPACING)));
 		int_on = !(cur_ints & (((u64) 1) << irq_dirty));
@@ -216,6 +215,7 @@
 {
 	u64 pending;
 	unsigned int irq_dirty;
+	int k;
 
 	/*
 	 * If the interrupt was an HT interrupt, now is the time to
@@ -227,7 +227,6 @@
 	if ((irq_dirty >= BCM1480_NR_IRQS_HALF) && (irq_dirty <= BCM1480_NR_IRQS)) {
 		irq_dirty -= BCM1480_NR_IRQS_HALF;
 	}
-	int k;
 	for (k=0; k<2; k++) { /* Loop through high and low LDT interrupts */
 		pending = __raw_readq(IOADDR(A_BCM1480_IMR_REGISTER(bcm1480_irq_owner[irq],
 						R_BCM1480_IMR_LDT_INTERRUPT_H + (k*BCM1480_IMR_HL_SPACING))));


-- 
Martin Michlmayr
http://www.cyrius.com/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [MIPS] Fix compiler warnings in arch/mips/sibyte/bcm1480/irq.c
  2006-02-20  4:57 [MIPS] Fix compiler warnings in arch/mips/sibyte/bcm1480/irq.c Martin Michlmayr
@ 2006-02-20 11:09 ` Ralf Baechle
  0 siblings, 0 replies; 2+ messages in thread
From: Ralf Baechle @ 2006-02-20 11:09 UTC (permalink / raw)
  To: Martin Michlmayr; +Cc: linux-mips, mark.e.mason

On Mon, Feb 20, 2006 at 04:57:00AM +0000, Martin Michlmayr wrote:

> Fix the following compiler warnings:
> 
>   CC      arch/mips/sibyte/bcm1480/irq.o
> arch/mips/sibyte/bcm1480/irq.c: In function ‘bcm1480_set_affinity’:
> arch/mips/sibyte/bcm1480/irq.c:168: warning: ISO C90 forbids mixed declarations and code
> arch/mips/sibyte/bcm1480/irq.c: In function ‘ack_bcm1480_irq’:
> arch/mips/sibyte/bcm1480/irq.c:230: warning: ISO C90 forbids mixed declarations and code

Not only ISO C - it simply doesn't build with gcc 3.2.  Applied,

  Ralf

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-02-20 11:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-20  4:57 [MIPS] Fix compiler warnings in arch/mips/sibyte/bcm1480/irq.c Martin Michlmayr
2006-02-20 11:09 ` Ralf Baechle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.