public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -tip] x86: apic/io_apic fix compilation warning
@ 2009-03-21 10:22 Jaswinder Singh Rajput
  2009-03-21 16:36 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-21 10:22 UTC (permalink / raw)
  To: Ingo Molnar, x86 maintainers, LKML

Hello Ingo,

Is this fix looks OK to you:

From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date: Sat, 21 Mar 2009 15:41:17 +0530
Subject: [PATCH] x86: apic/io_apic fix compilation warning

Fix:
 arch/x86/kernel/apic/io_apic.c:1431: warning: ‘msi_ir_chip’ defined but not used

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/apic/io_apic.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index d882c03..3ca7838 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1428,7 +1428,6 @@ void __setup_vector_irq(int cpu)
 
 static struct irq_chip ioapic_chip;
 static struct irq_chip ir_ioapic_chip;
-static struct irq_chip msi_ir_chip;
 
 #define IOAPIC_AUTO     -1
 #define IOAPIC_EDGE     0
@@ -3402,6 +3401,8 @@ static struct irq_chip msi_ir_chip = {
 #endif
 	.retrigger	= ioapic_retrigger_irq,
 };
+#else
+static struct irq_chip msi_ir_chip;
 #endif
 
 /*
-- 
1.6.0.6




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

* Re: [PATCH -tip] x86: apic/io_apic fix compilation warning
  2009-03-21 10:22 [PATCH -tip] x86: apic/io_apic fix compilation warning Jaswinder Singh Rajput
@ 2009-03-21 16:36 ` Ingo Molnar
  2009-03-21 18:20   ` Jaswinder Singh Rajput
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-03-21 16:36 UTC (permalink / raw)
  To: Jaswinder Singh Rajput; +Cc: x86 maintainers, LKML


* Jaswinder Singh Rajput <jaswinder@kernel.org> wrote:

> Hello Ingo,
> 
> Is this fix looks OK to you:
> 
> From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> Date: Sat, 21 Mar 2009 15:41:17 +0530
> Subject: [PATCH] x86: apic/io_apic fix compilation warning
> 
> Fix:
>  arch/x86/kernel/apic/io_apic.c:1431: warning: ‘msi_ir_chip’ defined but not used
> 
> Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
> ---
>  arch/x86/kernel/apic/io_apic.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index d882c03..3ca7838 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -1428,7 +1428,6 @@ void __setup_vector_irq(int cpu)
>  
>  static struct irq_chip ioapic_chip;
>  static struct irq_chip ir_ioapic_chip;
> -static struct irq_chip msi_ir_chip;
>  
>  #define IOAPIC_AUTO     -1
>  #define IOAPIC_EDGE     0
> @@ -3402,6 +3401,8 @@ static struct irq_chip msi_ir_chip = {
>  #endif
>  	.retrigger	= ioapic_retrigger_irq,
>  };
> +#else
> +static struct irq_chip msi_ir_chip;
>  #endif

hm, i think it would be cleaner to remove the CONFIG_INTR_REMAP 
define altogether and define msi_ir_chip all the time. (and make 
sure this build fine even in the !INTR_REMAP case)

	Ingo

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

* Re: [PATCH -tip] x86: apic/io_apic fix compilation warning
  2009-03-21 16:36 ` Ingo Molnar
@ 2009-03-21 18:20   ` Jaswinder Singh Rajput
  0 siblings, 0 replies; 3+ messages in thread
From: Jaswinder Singh Rajput @ 2009-03-21 18:20 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: x86 maintainers, LKML

On Sat, 2009-03-21 at 17:36 +0100, Ingo Molnar wrote:

> hm, i think it would be cleaner to remove the CONFIG_INTR_REMAP 
> define altogether and define msi_ir_chip all the time. (and make 
> sure this build fine even in the !INTR_REMAP case)
> 

Is this looks OK to you and can you please check this in your
magic .config files:

From: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Date: Sat, 21 Mar 2009 23:40:00 +0530
Subject: [PATCH] x86: apic/io_apic.c define msi_ir_chip and ir_ioapic_chip all the time

move out msi_ir_chip and ir_ioapic_chip from CONFIG_INTR_REMAP shadow

Fix:
 arch/x86/kernel/apic/io_apic.c:1431: warning: ‘msi_ir_chip’ defined but not used

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
---
 arch/x86/kernel/apic/io_apic.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index d882c03..1aea1c2 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -1428,7 +1428,6 @@ void __setup_vector_irq(int cpu)
 
 static struct irq_chip ioapic_chip;
 static struct irq_chip ir_ioapic_chip;
-static struct irq_chip msi_ir_chip;
 
 #define IOAPIC_AUTO     -1
 #define IOAPIC_EDGE     0
@@ -2663,20 +2662,20 @@ static struct irq_chip ioapic_chip __read_mostly = {
 	.retrigger	= ioapic_retrigger_irq,
 };
 
-#ifdef CONFIG_INTR_REMAP
 static struct irq_chip ir_ioapic_chip __read_mostly = {
 	.name		= "IR-IO-APIC",
 	.startup	= startup_ioapic_irq,
 	.mask		= mask_IO_APIC_irq,
 	.unmask		= unmask_IO_APIC_irq,
+#ifdef CONFIG_INTR_REMAP
 	.ack		= ack_x2apic_edge,
 	.eoi		= ack_x2apic_level,
 #ifdef CONFIG_SMP
 	.set_affinity	= set_ir_ioapic_affinity_irq,
 #endif
+#endif
 	.retrigger	= ioapic_retrigger_irq,
 };
-#endif
 
 static inline void init_IO_APIC_traps(void)
 {
@@ -3391,18 +3390,18 @@ static struct irq_chip msi_chip = {
 	.retrigger	= ioapic_retrigger_irq,
 };
 
-#ifdef CONFIG_INTR_REMAP
 static struct irq_chip msi_ir_chip = {
 	.name		= "IR-PCI-MSI",
 	.unmask		= unmask_msi_irq,
 	.mask		= mask_msi_irq,
+#ifdef CONFIG_INTR_REMAP
 	.ack		= ack_x2apic_edge,
 #ifdef CONFIG_SMP
 	.set_affinity	= ir_set_msi_irq_affinity,
 #endif
+#endif
 	.retrigger	= ioapic_retrigger_irq,
 };
-#endif
 
 /*
  * Map the PCI dev to the corresponding remapping hardware unit
-- 
1.6.0.6




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

end of thread, other threads:[~2009-03-21 18:21 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-21 10:22 [PATCH -tip] x86: apic/io_apic fix compilation warning Jaswinder Singh Rajput
2009-03-21 16:36 ` Ingo Molnar
2009-03-21 18:20   ` Jaswinder Singh Rajput

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