From: Akinobu Mita <akinobu.mita@gmail.com>
To: linux-kernel@vger.kernel.org, akpm@linux-foundation.org
Cc: Akinobu Mita <akinobu.mita@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, "H. Peter Anvin" <hpa@zytor.com>,
x86@kernel.org
Subject: [PATCH 04/12] x86: convert cpu notifier to return encapsulate errno value
Date: Thu, 18 Mar 2010 18:05:16 +0900 [thread overview]
Message-ID: <1268903124-10237-4-git-send-email-akinobu.mita@gmail.com> (raw)
In-Reply-To: <1268903124-10237-1-git-send-email-akinobu.mita@gmail.com>
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>
Cc: x86@kernel.org
---
arch/x86/kernel/cpu/mcheck/therm_throt.c | 2 +-
arch/x86/kernel/cpuid.c | 2 +-
arch/x86/kernel/msr.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/therm_throt.c b/arch/x86/kernel/cpu/mcheck/therm_throt.c
index 81c499e..e1a0a3b 100644
--- a/arch/x86/kernel/cpu/mcheck/therm_throt.c
+++ b/arch/x86/kernel/cpu/mcheck/therm_throt.c
@@ -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 =
diff --git a/arch/x86/kernel/cpuid.c b/arch/x86/kernel/cpuid.c
index 83e5e62..caf11b5 100644
--- a/arch/x86/kernel/cpuid.c
+++ b/arch/x86/kernel/cpuid.c
@@ -169,7 +169,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 =
diff --git a/arch/x86/kernel/msr.c b/arch/x86/kernel/msr.c
index 206735a..823081b 100644
--- a/arch/x86/kernel/msr.c
+++ b/arch/x86/kernel/msr.c
@@ -229,7 +229,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 = {
--
1.6.0.6
next prev parent reply other threads:[~2010-03-18 9:07 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-18 9:05 [PATCH 01/12] cpu-hotplug: introduce cpu_notify(), __cpu_notify(), cpu_notify_nofail() Akinobu Mita
2010-03-18 9:05 ` [PATCH 02/12] cpu-hotplug: return better errno on cpu hotplug failure Akinobu Mita
2010-03-18 9:05 ` [PATCH 03/12] notifier: change notifier_from_errno(0) to return NOTIFY_OK Akinobu Mita
2010-03-18 9:05 ` Akinobu Mita [this message]
2010-03-18 9:05 ` [PATCH 05/12] topology: convert cpu notifier to return encapsulate errno value Akinobu Mita
2010-03-18 9:05 ` [PATCH 06/12] kernel/: " Akinobu Mita
2010-03-18 9:05 ` [PATCH 07/12] slab: " Akinobu Mita
2010-03-18 17:21 ` Pekka Enberg
2010-03-18 9:05 ` [PATCH 08/12] iucv: " Akinobu Mita
2010-03-18 9:05 ` [PATCH 09/12] ehca: " Akinobu Mita
2010-03-29 8:47 ` Alexander Schmidt
2010-03-18 9:05 ` [PATCH 10/12] s390: " Akinobu Mita
2010-03-18 9:05 ` [PATCH 11/12] md: " Akinobu Mita
2010-03-18 9:05 ` [PATCH 12/12] add CPU notifier error injection module Akinobu Mita
2010-03-22 21:48 ` Andrew Morton
2010-03-23 13:00 ` Akinobu Mita
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1268903124-10237-4-git-send-email-akinobu.mita@gmail.com \
--to=akinobu.mita@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox