Skip to content

Commit

Permalink
x86: convert cpu notifier to return encapsulate errno value
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed May 27, 2010
1 parent b957e04 commit a94247e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpu/mcheck/therm_throt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/cpuid.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion arch/x86/kernel/msr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit a94247e

Please sign in to comment.