public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] early-quirks: remove duplicate #ifdef
@ 2009-04-06 22:11 Jeremy Fitzhardinge
  2009-04-08 12:17 ` Ingo Molnar
  0 siblings, 1 reply; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2009-04-06 22:11 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: the arch/x86 maintainers, Linux Kernel Mailing List

"#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)" was repeated
twice.

Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index ebdb85c..76b8cd9 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -97,7 +97,6 @@ static void __init nvidia_bugs(int num, int slot, int func)
 }
 
 #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
-#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
 static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
 {
 	u32 d;
@@ -115,7 +114,6 @@ static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
 	d &= 0xff;
 	return d;
 }
-#endif
 
 static void __init ati_bugs(int num, int slot, int func)
 {



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

* Re: [PATCH] early-quirks: remove duplicate #ifdef
  2009-04-06 22:11 [PATCH] early-quirks: remove duplicate #ifdef Jeremy Fitzhardinge
@ 2009-04-08 12:17 ` Ingo Molnar
  2009-04-08 17:02   ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 3+ messages in thread
From: Ingo Molnar @ 2009-04-08 12:17 UTC (permalink / raw)
  To: Jeremy Fitzhardinge; +Cc: the arch/x86 maintainers, Linux Kernel Mailing List


* Jeremy Fitzhardinge <jeremy@goop.org> wrote:

> "#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)" was repeated
> twice.
>
> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

hm, this was due to the patch below. Your patch essentially reverts 
that patch?

	Ingo

--------------->
>From a59dacfdc9ba06903652fa4883bf1106278b18ec Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Fri, 17 Oct 2008 14:38:08 +0200
Subject: [PATCH] x86 early quirks: eliminate unused function
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

Impact: cleanup

this warning:

  arch/x86/kernel/early-quirks.c:99: warning: ‘ati_ixp4x0_rev’ defined but not used

triggers because ati_ixp4x0_rev() is only used in the
ACPI && X86_IO_APIC case.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 arch/x86/kernel/early-quirks.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
index 76b8cd9..ebdb85c 100644
--- a/arch/x86/kernel/early-quirks.c
+++ b/arch/x86/kernel/early-quirks.c
@@ -97,6 +97,7 @@ static void __init nvidia_bugs(int num, int slot, int func)
 }
 
 #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
+#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
 static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
 {
 	u32 d;
@@ -114,6 +115,7 @@ static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
 	d &= 0xff;
 	return d;
 }
+#endif
 
 static void __init ati_bugs(int num, int slot, int func)
 {

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

* Re: [PATCH] early-quirks: remove duplicate #ifdef
  2009-04-08 12:17 ` Ingo Molnar
@ 2009-04-08 17:02   ` Jeremy Fitzhardinge
  0 siblings, 0 replies; 3+ messages in thread
From: Jeremy Fitzhardinge @ 2009-04-08 17:02 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: the arch/x86 maintainers, Linux Kernel Mailing List

Ingo Molnar wrote:
> * Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>
>   
>> "#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)" was repeated
>> twice.
>>
>> Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
>>     
>
> hm, this was due to the patch below. Your patch essentially reverts 
> that patch?
>   

Is that patch the result of a merge?

With that patch in place, the code structure is essentially:

#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
{
	...
}
#endif

...
#endif


I can't see how the inner #if is doing anything useful at all.

    J
> 	Ingo
>
> --------------->
> From a59dacfdc9ba06903652fa4883bf1106278b18ec Mon Sep 17 00:00:00 2001
> From: Ingo Molnar <mingo@elte.hu>
> Date: Fri, 17 Oct 2008 14:38:08 +0200
> Subject: [PATCH] x86 early quirks: eliminate unused function
> MIME-Version: 1.0
> Content-Type: text/plain; charset=utf-8
> Content-Transfer-Encoding: 8bit
>
> Impact: cleanup
>
> this warning:
>
>   arch/x86/kernel/early-quirks.c:99: warning: ‘ati_ixp4x0_rev’ defined but not used
>
> triggers because ati_ixp4x0_rev() is only used in the
> ACPI && X86_IO_APIC case.
>
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  arch/x86/kernel/early-quirks.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/early-quirks.c b/arch/x86/kernel/early-quirks.c
> index 76b8cd9..ebdb85c 100644
> --- a/arch/x86/kernel/early-quirks.c
> +++ b/arch/x86/kernel/early-quirks.c
> @@ -97,6 +97,7 @@ static void __init nvidia_bugs(int num, int slot, int func)
>  }
>  
>  #if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
> +#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)
>  static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
>  {
>  	u32 d;
> @@ -114,6 +115,7 @@ static u32 __init ati_ixp4x0_rev(int num, int slot, int func)
>  	d &= 0xff;
>  	return d;
>  }
> +#endif
>  
>  static void __init ati_bugs(int num, int slot, int func)
>  {
>   


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

end of thread, other threads:[~2009-04-08 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-06 22:11 [PATCH] early-quirks: remove duplicate #ifdef Jeremy Fitzhardinge
2009-04-08 12:17 ` Ingo Molnar
2009-04-08 17:02   ` Jeremy Fitzhardinge

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