Skip to contentSkip to conversation

sparc: Fix minor SPARC32 compile error

PATCH Applied Julian Calaby 2 participants 2 messages Jan 5, 2009 – Jan 6, 2009 SPARC + UltraSPARC (sparc/sparc64)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sparc: Fix minor SPARC32 compile error

sparc: Fix minor SPARC32 compile error

When CONFIG_PROC_FS is unset, include/linux/interrupt.h defines init_irq_proc() as an empty function.

arch/sparc/kernel/irq_32.c defines this function unconditionally.

Fix the latter so that it only defines this function when CONFIG_PROC_FS is set.

This fixes the following error:
arch/sparc/kernel/irq_32.c:672: error: redefinition of 'init_irq_proc' include/linux/interrupt.h:461: error: previous definition of 'init_irq_proc' was here

This was found using randconfig builds.

---

I understand that this is utterly insignificant, but I can't just let it slide.

---

Sorry for the dupe, wrong account!

  arch/sparc/kernel/irq_32.c |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
arch/sparc/kernel/irq_32.c +2 -0
index f3488c4..1eff942 100644
@@ -669,7 +669,9 @@ void __init init_IRQ(void)
  	btfixup();
  }
 
+#ifdef CONFIG_PROC_FS
  void init_irq_proc(void)
  {
  	/* For now, nothing... */
  }
+#endif /* CONFIG_PROC_FS */
maintainer Applied
#1 lore raw

From: Julian Calaby <[email protected]>
Date: Tue, 06 Jan 2009 00:22:18 +1100

Quoted 10 lines

sparc: Fix minor SPARC32 compile error

When CONFIG_PROC_FS is unset, include/linux/interrupt.h defines init_irq_proc() as an empty function.

arch/sparc/kernel/irq_32.c defines this function unconditionally.

Fix the latter so that it only defines this function when CONFIG_PROC_FS is set.

Quoted 8 lines

This fixes the following error:
arch/sparc/kernel/irq_32.c:672: error: redefinition of 'init_irq_proc' include/linux/interrupt.h:461: error: previous definition of 'init_irq_proc' was here

This was found using randconfig builds.

Applied, thanks a lot Julian.