* [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef.
@ 2010-11-29 1:06 Thiago Farina
2010-11-29 8:34 ` Ingo Molnar
2010-11-29 10:27 ` Rakib Mullick
0 siblings, 2 replies; 3+ messages in thread
From: Thiago Farina @ 2010-11-29 1:06 UTC (permalink / raw)
To: linux-kernel
Cc: Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86, Suresh Siddha,
Yinghai Lu
This variable is only used in the presence of the CONFIG_GENERIC_PENDING_IRQ.
So when compiling without this config, we get the following warning:
arch/x86/kernel/apic/io_apic.c: In function ‘ack_apic_level’:
arch/x86/kernel/apic/io_apic.c:2433: warning: unused variable ‘desc’
Signed-off-by: Thiago Farina <tfransosi@gmail.com>
---
arch/x86/kernel/apic/io_apic.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 7cc0a72..56261be 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2430,9 +2430,12 @@ static void ack_apic_level(struct irq_data *data)
{
struct irq_cfg *cfg = data->chip_data;
int i, do_unmask_irq = 0, irq = data->irq;
- struct irq_desc *desc = irq_to_desc(irq);
unsigned long v;
+#ifdef CONFIG_GENERIC_PENDING_IRQ
+ struct irq_desc *desc = irq_to_desc(irq);
+#endif
+
irq_complete_move(cfg);
#ifdef CONFIG_GENERIC_PENDING_IRQ
/* If we are moving the irq we need to mask it */
--
1.7.3.2.343.g7d43d
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef.
2010-11-29 1:06 [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef Thiago Farina
@ 2010-11-29 8:34 ` Ingo Molnar
2010-11-29 10:27 ` Rakib Mullick
1 sibling, 0 replies; 3+ messages in thread
From: Ingo Molnar @ 2010-11-29 8:34 UTC (permalink / raw)
To: Thiago Farina
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Suresh Siddha, Yinghai Lu
* Thiago Farina <tfransosi@gmail.com> wrote:
> This variable is only used in the presence of the CONFIG_GENERIC_PENDING_IRQ.
> So when compiling without this config, we get the following warning:
>
> arch/x86/kernel/apic/io_apic.c: In function ‘ack_apic_level’:
> arch/x86/kernel/apic/io_apic.c:2433: warning: unused variable ‘desc’
>
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
> arch/x86/kernel/apic/io_apic.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 7cc0a72..56261be 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -2430,9 +2430,12 @@ static void ack_apic_level(struct irq_data *data)
> {
> struct irq_cfg *cfg = data->chip_data;
> int i, do_unmask_irq = 0, irq = data->irq;
> - struct irq_desc *desc = irq_to_desc(irq);
> unsigned long v;
>
> +#ifdef CONFIG_GENERIC_PENDING_IRQ
> + struct irq_desc *desc = irq_to_desc(irq);
> +#endif
> +
> irq_complete_move(cfg);
> #ifdef CONFIG_GENERIC_PENDING_IRQ
> /* If we are moving the irq we need to mask it */
This is very ugly, and it was ugly before your patch as well.
Please move the bits that are under CONFIG_GENERIC_PENDING_IRQ into a helper inline
function.
Thanks,
Ingo
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef.
2010-11-29 1:06 [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef Thiago Farina
2010-11-29 8:34 ` Ingo Molnar
@ 2010-11-29 10:27 ` Rakib Mullick
1 sibling, 0 replies; 3+ messages in thread
From: Rakib Mullick @ 2010-11-29 10:27 UTC (permalink / raw)
To: Thiago Farina
Cc: linux-kernel, Thomas Gleixner, Ingo Molnar, H. Peter Anvin, x86,
Suresh Siddha, Yinghai Lu
On Mon, Nov 29, 2010 at 7:06 AM, Thiago Farina <tfransosi@gmail.com> wrote:
> This variable is only used in the presence of the CONFIG_GENERIC_PENDING_IRQ.
> So when compiling without this config, we get the following warning:
>
> arch/x86/kernel/apic/io_apic.c: In function ‘ack_apic_level’:
> arch/x86/kernel/apic/io_apic.c:2433: warning: unused variable ‘desc’
>
Its been already fixed by
http://marc.info/?l=linux-mm-commits&m=128821373401265&w=2. Currently
its on -mm tree.
thanks,
rakib
> Signed-off-by: Thiago Farina <tfransosi@gmail.com>
> ---
> arch/x86/kernel/apic/io_apic.c | 5 ++++-
> 1 files changed, 4 insertions(+), 1 deletions(-)
>
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index 7cc0a72..56261be 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -2430,9 +2430,12 @@ static void ack_apic_level(struct irq_data *data)
> {
> struct irq_cfg *cfg = data->chip_data;
> int i, do_unmask_irq = 0, irq = data->irq;
> - struct irq_desc *desc = irq_to_desc(irq);
> unsigned long v;
>
> +#ifdef CONFIG_GENERIC_PENDING_IRQ
> + struct irq_desc *desc = irq_to_desc(irq);
> +#endif
> +
> irq_complete_move(cfg);
> #ifdef CONFIG_GENERIC_PENDING_IRQ
> /* If we are moving the irq we need to mask it */
> --
> 1.7.3.2.343.g7d43d
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-11-29 10:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-11-29 1:06 [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef Thiago Farina
2010-11-29 8:34 ` Ingo Molnar
2010-11-29 10:27 ` Rakib Mullick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome