public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP
@ 2014-07-27 16:57 Mark Brown
  2014-07-28 16:01 ` Marc Zyngier
  2014-08-17 16:57 ` Jason Cooper
  0 siblings, 2 replies; 4+ messages in thread
From: Mark Brown @ 2014-07-27 16:57 UTC (permalink / raw)
  To: Thomas Gleixner, Jason Cooper
  Cc: linux-kernel, Marc Zyngier, linux-arm-kernel, linaro-kernel,
	Mark Brown

From: Mark Brown <broonie@linaro.org>

If building with CONFIG_SMP disbled (for example, with allnoconfig) then
GCC complains that the static function gic_peek_irq() is defined but not
used since the only reference is in the SMP initialisation code. Fix this
by moving the function definition inside the ifdef.

Signed-off-by: Mark Brown <broonie@linaro.org>
---
 drivers/irqchip/irq-gic-v3.c | 26 +++++++++++++-------------
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 81519bae0453..30130f955151 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -200,19 +200,6 @@ static void gic_poke_irq(struct irq_data *d, u32 offset)
 	rwp_wait();
 }
 
-static int gic_peek_irq(struct irq_data *d, u32 offset)
-{
-	u32 mask = 1 << (gic_irq(d) % 32);
-	void __iomem *base;
-
-	if (gic_irq_in_rdist(d))
-		base = gic_data_rdist_sgi_base();
-	else
-		base = gic_data.dist_base;
-
-	return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
-}
-
 static void gic_mask_irq(struct irq_data *d)
 {
 	gic_poke_irq(d, GICD_ICENABLER);
@@ -401,6 +388,19 @@ static void gic_cpu_init(void)
 }
 
 #ifdef CONFIG_SMP
+static int gic_peek_irq(struct irq_data *d, u32 offset)
+{
+	u32 mask = 1 << (gic_irq(d) % 32);
+	void __iomem *base;
+
+	if (gic_irq_in_rdist(d))
+		base = gic_data_rdist_sgi_base();
+	else
+		base = gic_data.dist_base;
+
+	return !!(readl_relaxed(base + offset + (gic_irq(d) / 32) * 4) & mask);
+}
+
 static int gic_secondary_init(struct notifier_block *nfb,
 			      unsigned long action, void *hcpu)
 {
-- 
2.0.1


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

* Re: [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP
  2014-07-27 16:57 [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP Mark Brown
@ 2014-07-28 16:01 ` Marc Zyngier
  2014-08-17 16:57 ` Jason Cooper
  1 sibling, 0 replies; 4+ messages in thread
From: Marc Zyngier @ 2014-07-28 16:01 UTC (permalink / raw)
  To: Mark Brown
  Cc: Thomas Gleixner, Jason Cooper, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linaro-kernel@lists.linaro.org, Mark Brown

On 27/07/14 17:57, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> If building with CONFIG_SMP disbled (for example, with allnoconfig) then
> GCC complains that the static function gic_peek_irq() is defined but not
> used since the only reference is in the SMP initialisation code. Fix this
> by moving the function definition inside the ifdef.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>

Looks sane to me.

Acked-by: Marc Zyngier <marc.zyngier@arm.com>

	M.
-- 
Jazz is not dead. It just smells funny...

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

* Re: [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP
  2014-07-27 16:57 [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP Mark Brown
  2014-07-28 16:01 ` Marc Zyngier
@ 2014-08-17 16:57 ` Jason Cooper
  2014-09-06 12:54   ` Mark Brown
  1 sibling, 1 reply; 4+ messages in thread
From: Jason Cooper @ 2014-08-17 16:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: Thomas Gleixner, linux-kernel, Marc Zyngier, linux-arm-kernel,
	linaro-kernel, Mark Brown

Mark,

On Sun, Jul 27, 2014 at 05:57:04PM +0100, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
> 
> If building with CONFIG_SMP disbled (for example, with allnoconfig) then
> GCC complains that the static function gic_peek_irq() is defined but not
> used since the only reference is in the SMP initialisation code. Fix this
> by moving the function definition inside the ifdef.
> 
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
>  drivers/irqchip/irq-gic-v3.c | 26 +++++++++++++-------------
>  1 file changed, 13 insertions(+), 13 deletions(-)

Applied to irqchip/urgent with Mark's Ack.

thx,

Jason.

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

* Re: [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP
  2014-08-17 16:57 ` Jason Cooper
@ 2014-09-06 12:54   ` Mark Brown
  0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2014-09-06 12:54 UTC (permalink / raw)
  To: Jason Cooper
  Cc: linaro-kernel, Marc Zyngier, linux-kernel, Thomas Gleixner,
	linux-arm-kernel

[-- Attachment #1: Type: text/plain, Size: 582 bytes --]

On Sun, Aug 17, 2014 at 12:57:36PM -0400, Jason Cooper wrote:
> On Sun, Jul 27, 2014 at 05:57:04PM +0100, Mark Brown wrote:
> > From: Mark Brown <broonie@linaro.org>

> > If building with CONFIG_SMP disbled (for example, with allnoconfig) then
> > GCC complains that the static function gic_peek_irq() is defined but not
> > used since the only reference is in the SMP initialisation code. Fix this
> > by moving the function definition inside the ifdef.

> Applied to irqchip/urgent with Mark's Ack.

This also appears to have disappeared from -next and again the warning
is back.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

end of thread, other threads:[~2014-09-06 12:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-27 16:57 [PATCH] irqchip: gic-v3: Only define gic_peek_irq() when building SMP Mark Brown
2014-07-28 16:01 ` Marc Zyngier
2014-08-17 16:57 ` Jason Cooper
2014-09-06 12:54   ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox