x86: fix recursion in arch/x86/kernel/cpu/mcheck/mce_amd_64.c
authorYinghai Lu <yhlu.kernel@gmail.com>
Wed, 30 Jan 2008 12:33:40 +0000 (13:33 +0100)
committerIngo Molnar <mingo@elte.hu>
Wed, 30 Jan 2008 12:33:40 +0000 (13:33 +0100)
remove the recursion from this function.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
arch/x86/kernel/cpu/mcheck/mce_amd_64.c

index 77e666628818116595b01cfcdf0536bd6aeb1422..32671da8184e5e78c1e090d5d795606057f3cd37 100644 (file)
@@ -555,7 +555,7 @@ static __cpuinit int threshold_create_device(unsigned int cpu)
        int err = 0;
 
        for (bank = 0; bank < NR_BANKS; ++bank) {
-               if (!(per_cpu(bank_map, cpu) & 1 << bank))
+               if (!(per_cpu(bank_map, cpu) & (1 << bank)))
                        continue;
                err = threshold_create_bank(cpu, bank);
                if (err)
@@ -638,7 +638,7 @@ static void threshold_remove_device(unsigned int cpu)
        unsigned int bank;
 
        for (bank = 0; bank < NR_BANKS; ++bank) {
-               if (!(per_cpu(bank_map, cpu) & 1 << bank))
+               if (!(per_cpu(bank_map, cpu) & (1 << bank)))
                        continue;
                threshold_remove_bank(cpu, bank);
        }