Skip to contentSkip to conversation

x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

PATCH In review Hidehiro Kawai 4 participants 5 messages Jul 22, 2009 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".

---
 arch/x86/kernel/irqinit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/irqinit.c +1 -1
index 8a194ad..ccf8ab5 100644
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
 #ifdef CONFIG_X86_THERMAL_VECTOR
 	alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
 #endif
-#ifdef CONFIG_X86_THRESHOLD
+#ifdef CONFIG_X86_MCE_THRESHOLD
 	alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
 #endif
 #if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_LOCAL_APIC)
Signature · 6 lines
1.6.2.5

-- 
Hidehiro Kawai
Hitachi, Systems Development Laboratory
Linux Technology Center
Reviewed-by on v1 1/1
#1 lore raw
Quoted 13 lines · Hidehiro Kawai

CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".

---
 arch/x86/kernel/irqinit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/irqinit.c +0 -0
index 8a194ad..ccf8ab5 100644

arch/x86/kernel/irqinit.c static void __init apic_intr_init(void) · line 193

Quoted 8 lines
arch/x86/kernel/irqinit.c +1 -1
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
 #ifdef CONFIG_X86_THERMAL_VECTOR
 	alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
 #endif
-#ifdef CONFIG_X86_THRESHOLD
+#ifdef CONFIG_X86_MCE_THRESHOLD
 	alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
 #endif
 #if defined(CONFIG_X86_MCE) && defined(CONFIG_X86_LOCAL_APIC)

It seems that this ifdef was introduced by the following merge commit:

Quoted 5 lines

commit 940010c5a314a7bd9b498593bc6ba1718ac5aec5
Merge: 8dc8e5e... 991ec02...
Author: Ingo Molnar <[email protected]>
Date: Thu Jun 11 17:55:42 2009 +0200

Quoted 9 lines
    Merge branch 'linus' into perfcounters/core

    Conflicts:
        arch/x86/kernel/irqinit.c
        arch/x86/kernel/irqinit_64.c
        arch/x86/kernel/traps.c
        arch/x86/mm/fault.c
        include/linux/sched.h
        kernel/exit.c

Thank you for finding it!

Thanks,
H.Seto

#4 lore raw
In reply to Hidehiro Kawai
Commit-ID:  6effa8f6fc786f00e3a23eae605e0f2e8e748faa
Gitweb:     http://git.kernel.org/tip/6effa8f6fc786f00e3a23eae605e0f2e8e748faa
Author:     Hidehiro Kawai <[email protected]>
AuthorDate: Wed, 22 Jul 2009 11:56:20 +0900
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Tue, 21 Jul 2009 21:43:22 -0700

x86, mce: Rename incorrect macro name "CONFIG_X86_THRESHOLD"

CONFIG_X86_THRESHOLD used in arch/x86/kernel/irqinit.c is always undefined. Rename it to the correct name "CONFIG_X86_MCE_THRESHOLD".

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/irqinit.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/irqinit.c +1 -1
index 696f0e4..92b7703 100644
@@ -187,7 +187,7 @@ static void __init apic_intr_init(void)
 #ifdef CONFIG_X86_THERMAL_VECTOR
 	alloc_intr_gate(THERMAL_APIC_VECTOR, thermal_interrupt);
 #endif
-#ifdef CONFIG_X86_THRESHOLD
+#ifdef CONFIG_X86_MCE_THRESHOLD
 	alloc_intr_gate(THRESHOLD_APIC_VECTOR, threshold_interrupt);
 #endif
 #if defined(CONFIG_X86_NEW_MCE) && defined(CONFIG_X86_LOCAL_APIC)
#2 lore raw
In reply to Hidetoshi Seto
Quoted 2 lines

It seems that this ifdef was introduced by the following merge commit:

I also managed to introduce similar bugs during merges in the past. It's very easy and hard to find.

Perhaps it would be good if we had some automated tool that checks all CONFIG_*s referenced exist in Kconfig and that is run regularly.

-Andi

#3 lore raw
Quoted 8 lines · Andi Kleen
Quoted 2 lines

It seems that this ifdef was introduced by the following merge commit:

I also managed to introduce similar bugs during merges in the past. It's very easy and hard to find.

Perhaps it would be good if we had some automated tool that checks all CONFIG_*s referenced exist in Kconfig and that is run regularly.

There is checkkconfigsymbols.sh...

Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.