All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@kernel.org>
To: "Németh Márton" <nm127@freemail.hu>
Cc: 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>,
	Naga Chumbalkar <nagananda.chumbalkar@hp.com>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86 apic: only compile local function if used
Date: Mon, 7 May 2012 15:12:29 +0200	[thread overview]
Message-ID: <20120507131229.GF23858@gmail.com> (raw)
In-Reply-To: <4F89FD7C.2060707@freemail.hu>


* Németh Márton <nm127@freemail.hu> wrote:

> From: Márton Németh <nm127@freemail.hu>
> 
> The local function io_apic_level_ack_pending() is only called from
> io_apic_level_ack_pending(). The later function is only compiled
> if CONFIG_GENERIC_PENDING_IRQ is defined. Use this define around
> io_apic_level_ack_pending() function as well.
> 
> This will remove the following warning message during compiling
> without CONFIG_GENERIC_PENDING_IRQ defined:
>  * arch/x86/kernel/apic/io_apic.c:382: warning: ‘io_apic_level_ack_pending’ defined but not used
> 
> Signed-off-by: Márton Németh <nm127@freemail.hu>
> ---
> diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
> index e88300d..9b85009 100644
> --- a/arch/x86/kernel/apic/io_apic.c
> +++ b/arch/x86/kernel/apic/io_apic.c
> @@ -379,6 +379,7 @@ static void __io_apic_modify(unsigned int apic, unsigned int reg, unsigned int v
>  	writel(value, &io_apic->data);
>  }
> 
> +#ifdef CONFIG_GENERIC_PENDING_IRQ
>  static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
>  {
>  	struct irq_pin_list *entry;
> @@ -401,6 +402,7 @@ static bool io_apic_level_ack_pending(struct irq_cfg *cfg)
> 
>  	return false;
>  }
> +#endif
> 
>  union entry_union {
>  	struct { u32 w1, w2; };

it would be better/cleaner to just move this function into the 
already existing #ifdef CONFIG_GENERIC_PENDING_IRQ block.

Thanks,

	Ingo

  reply	other threads:[~2012-05-07 13:12 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14 22:43 [PATCH] x86 apic: only compile local function if used Németh Márton
2012-05-07 13:12 ` Ingo Molnar [this message]
2012-05-08  7:24   ` Suresh Siddha
2012-05-08 10:04     ` [tip:x86/apic] x86/apic: Only compile local function if used with !CONFIG_GENERIC_PENDING_IRQ tip-bot for Márton Németh

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=20120507131229.GF23858@gmail.com \
    --to=mingo@kernel.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=nagananda.chumbalkar@hp.com \
    --cc=nm127@freemail.hu \
    --cc=suresh.b.siddha@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.