Skip to contentSkip to conversation

irqchip: armada: avoid unused function warnings

PATCH In review Arnd Bergmann 3 participants 3 messages Jul 18, 2016 – Jul 19, 2016

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

PATCH 1/1 irqchip: armada: avoid unused function warnings

When building with CONFIG_SMP disabled, we get some new harmless warnings:

drivers/irqchip/irq-armada-370-xp.c:356:12: error: 'mpic_cascaded_starting_cpu' defined but not used [-Werror=unused-function]
static int mpic_cascaded_starting_cpu(unsigned int cpu)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/irqchip/irq-armada-370-xp.c:349:12: error: 'armada_xp_mpic_starting_cpu' defined but not used [-Werror=unused-function]
static int armada_xp_mpic_starting_cpu(unsigned int cpu)

This moves the unused functions into the #ifdef, as they previously were.

Fixes cb5ff2d245c1 ("irqchip/armada-370-xp: Convert to hotplug state machine")
---
 drivers/irqchip/irq-armada-370-xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-armada-370-xp.c +1 -1
index dcc4923e0dc7..8bcee65a0b8c 100644
@@ -344,7 +344,6 @@ static void armada_mpic_send_doorbell(const struct cpumask *mask,
 	writel((map << 8) | irq, main_int_base +
 		ARMADA_370_XP_SW_TRIG_INT_OFFS);
 }
-#endif
 
 static int armada_xp_mpic_starting_cpu(unsigned int cpu)
 {
@@ -359,6 +358,7 @@ static int mpic_cascaded_starting_cpu(unsigned int cpu)
 	enable_percpu_irq(parent_irq, IRQ_TYPE_NONE);
 	return 0;
 }
+#endif
 
 static const struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
 	.map = armada_370_xp_mpic_irq_map,
Signature · 1 line
2.9.0
Acked-by on v1 1/1
#1 lore raw

+ Anna-Maria

Hey Arnd,

Quoted 8 lines · Arnd Bergmann

When building with CONFIG_SMP disabled, we get some new harmless warnings:

drivers/irqchip/irq-armada-370-xp.c:356:12: error: 'mpic_cascaded_starting_cpu' defined but not used [-Werror=unused-function]
static int mpic_cascaded_starting_cpu(unsigned int cpu)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/irqchip/irq-armada-370-xp.c:349:12: error: 'armada_xp_mpic_starting_cpu' defined but not used [-Werror=unused-function]
static int armada_xp_mpic_starting_cpu(unsigned int cpu)

Quoted 7 lines

This moves the unused functions into the #ifdef, as they previously were.

Fixes cb5ff2d245c1 ("irqchip/armada-370-xp: Convert to hotplug state machine")
---
 drivers/irqchip/irq-armada-370-xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Anna-Maria, can you make sure this gets pulled in with the cpuhp changes? afaict, cb5ff2d245c1 is only in the tip/WIP.hotplug and tip/master.

thx,

Jason.

#2 lore raw

[tip:smp/hotplug] irqchip/armada: Avoid unused function warnings

In reply to Arnd Bergmann
irqchip/armada: Avoid unused function warnings
Commit-ID:  c76c15e6f16c1529b524ba2c519c4fcef7a45e16
Gitweb:     http://git.kernel.org/tip/c76c15e6f16c1529b524ba2c519c4fcef7a45e16
Author:     Arnd Bergmann <[email protected]>
AuthorDate: Mon, 18 Jul 2016 18:03:21 +0200
Committer:  Ingo Molnar <[email protected]>
CommitDate: Tue, 19 Jul 2016 09:43:43 +0200

irqchip/armada: Avoid unused function warnings

When building with CONFIG_SMP disabled, we get some new harmless warnings:

drivers/irqchip/irq-armada-370-xp.c:356:12: error: 'mpic_cascaded_starting_cpu' defined but not used [-Werror=unused-function]
static int mpic_cascaded_starting_cpu(unsigned int cpu)

            ^~~~~~~~~~~~~~~~~~~~~~~~~~

drivers/irqchip/irq-armada-370-xp.c:349:12: error: 'armada_xp_mpic_starting_cpu' defined but not used [-Werror=unused-function]
static int armada_xp_mpic_starting_cpu(unsigned int cpu)

This moves the unused functions into the #ifdef, as they previously were.

Cc David S. Miller <[email protected]>
Cc Gregory CLEMENT <[email protected]>
Cc Linus Torvalds <[email protected]>
Cc Marc Zyngier <[email protected]>
Cc Peter Zijlstra <[email protected]>
Cc Richard Cochran <[email protected]>
Cc Thomas Gleixner <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Fixes cb5ff2d245c1 ("irqchip/armada-370-xp: Convert to hotplug state machine")
---
 drivers/irqchip/irq-armada-370-xp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-armada-370-xp.c +1 -1
index e2b8fee..cdef440 100644
@@ -344,7 +344,6 @@ static void armada_mpic_send_doorbell(const struct cpumask *mask,
 	writel((map << 8) | irq, main_int_base +
 		ARMADA_370_XP_SW_TRIG_INT_OFFS);
 }
-#endif
 
 static int armada_xp_mpic_starting_cpu(unsigned int cpu)
 {
@@ -359,6 +358,7 @@ static int mpic_cascaded_starting_cpu(unsigned int cpu)
 	enable_percpu_irq(parent_irq, IRQ_TYPE_NONE);
 	return 0;
 }
+#endif
 
 static const struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
 	.map = armada_370_xp_mpic_irq_map,