mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Thiago Farina <tfransosi@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, Suresh Siddha <suresh.b.siddha@intel.com>,
	Yinghai Lu <yinghai@kernel.org>
Subject: Re: [PATCH] apic/io_apic.c: Move variable 'desc' into the #ifdef.
Date: Mon, 29 Nov 2010 09:34:50 +0100	[thread overview]
Message-ID: <20101129083450.GC12374@elte.hu> (raw)
In-Reply-To: <4cc988bf535efac7a6aafe1ca0f0ac44f3968d94.1290992687.git.tfransosi@gmail.com>


* 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

  reply	other threads:[~2010-11-29  8:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-29  1:06 Thiago Farina
2010-11-29  8:34 ` Ingo Molnar [this message]
2010-11-29 10:27 ` Rakib Mullick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101129083450.GC12374@elte.hu \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=suresh.b.siddha@intel.com \
    --cc=tfransosi@gmail.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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