early-quirks: remove duplicate #ifdef
PATCH 1/1 early-quirks: remove duplicate #ifdef
"#if defined(CONFIG_ACPI) && defined(CONFIG_X86_IO_APIC)" was repeated twice.
arch/x86/kernel/early-quirks.c +0 -0
@@ -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) {
Quoted 4 lines · Jeremy Fitzhardinge
"#if
defined(CONFIG_ACPI)&&defined(CONFIG_X86_IO_APIC)" was repeated twice.Signed-off-by Jeremy Fitzhardinge <[email protected]>
hm, this was due to the patch below. Your patch essentially reverts that patch?
Ingo
--------------->
Quoted 1 line
From
a59dacfdc9ba06903652fa4883bf1106278b18ecMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
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.
--- arch/x86/kernel/early-quirks.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/kernel/early-quirks.c +2 -0
@@ -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) {
Quoted 11 lines · Ingo Molnar
Quoted 5 lines · Jeremy Fitzhardinge
"#if
defined(CONFIG_ACPI)&&defined(CONFIG_X86_IO_APIC)" was repeated twice.Signed-off-by Jeremy Fitzhardinge <[email protected]>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
Quoted 46 lines
Ingo
--------------->
Froma59dacfdc9ba06903652fa4883bf1106278b18ecMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
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: 8bitImpact: cleanup
this warning:
arch/x86/kernel/early-quirks.c:99: warning: ‘ati_ixp4x0_rev’ defined but not usedtriggers because
ati_ixp4x0_rev()is only used in the ACPI &&X86_IO_APICcase.Signed-off-by Ingo Molnar <[email protected]>--- arch/x86/kernel/early-quirks.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)arch/x86/kernel/early-quirks.c +2
-0@@ -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) {