]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
x86: convert cpu notifier to return encapsulate errno value
authorAkinobu Mita <akinobu.mita@gmail.com>
Wed, 26 May 2010 21:43:30 +0000 (14:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:12:48 +0000 (09:12 -0700)
By the previous modification, the cpu notifier can return encapsulate
errno value.  This converts the cpu notifiers for msr, cpuid, and
therm_throt.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/x86/kernel/cpu/mcheck/therm_throt.c
arch/x86/kernel/cpuid.c
arch/x86/kernel/msr.c

index 81c499eceb21d88f62499a86cb9b0034d8519858..e1a0a3bf9716722671325212dceb559db2a47bf3 100644 (file)
@@ -190,7 +190,7 @@ thermal_throttle_cpu_callback(struct notifier_block *nfb,
                mutex_unlock(&therm_cpu_lock);
                break;
        }
-       return err ? NOTIFY_BAD : NOTIFY_OK;
+       return notifier_from_errno(err);
 }
 
 static struct notifier_block thermal_throttle_cpu_notifier __cpuinitdata =
index 8b862d5900fe4a29b6bc100770e371db41ee0d91..1b7b31ab7d86536ecde1d68034cf882216ac32a6 100644 (file)
@@ -170,7 +170,7 @@ static int __cpuinit cpuid_class_cpu_callback(struct notifier_block *nfb,
                cpuid_device_destroy(cpu);
                break;
        }
-       return err ? NOTIFY_BAD : NOTIFY_OK;
+       return notifier_from_errno(err);
 }
 
 static struct notifier_block __refdata cpuid_class_cpu_notifier =
index 4d4468e9f47cbc7ba182ea92c78ec989c0a8b555..7bf2dc4c8f701de8965fc1e124126863c7384552 100644 (file)
@@ -230,7 +230,7 @@ static int __cpuinit msr_class_cpu_callback(struct notifier_block *nfb,
                msr_device_destroy(cpu);
                break;
        }
-       return err ? NOTIFY_BAD : NOTIFY_OK;
+       return notifier_from_errno(err);
 }
 
 static struct notifier_block __refdata msr_class_cpu_notifier = {