From b05c9cc37f321f2b38f67d45cbfd5d46644efa17 Mon Sep 17 00:00:00 2001 From: Akinobu Mita Date: Tue, 21 Jun 2011 03:35:56 +0000 Subject: [PATCH] --- yaml --- r: 259127 b: refs/heads/master c: de2780a3d82372a6bfc7f474905e346c0f26dfa4 h: refs/heads/master i: 259125: 3568855605338bfec23f2add3b4b4475c86d5e4b 259123: 4ae00dab2816b2ab10c1d071b3a48ec08342f226 259119: 9a8c993f6a70b8931a431ac1e3add78022cd77b0 v: v3 --- [refs] | 2 +- trunk/arch/powerpc/kernel/prom.c | 8 +++----- .../arch/powerpc/platforms/pseries/hotplug-cpu.c | 10 +++------- .../powerpc/platforms/pseries/hotplug-memory.c | 16 +++++----------- trunk/arch/powerpc/platforms/pseries/reconfig.c | 4 +--- 5 files changed, 13 insertions(+), 27 deletions(-) diff --git a/[refs] b/[refs] index e16a80a97371..8bd9e23fa4bf 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3aef19f0a10d1c274a15191766b627fe550d456e +refs/heads/master: de2780a3d82372a6bfc7f474905e346c0f26dfa4 diff --git a/trunk/arch/powerpc/kernel/prom.c b/trunk/arch/powerpc/kernel/prom.c index 534c50359e06..b8e6189298f4 100644 --- a/trunk/arch/powerpc/kernel/prom.c +++ b/trunk/arch/powerpc/kernel/prom.c @@ -849,16 +849,14 @@ static int prom_reconfig_notifier(struct notifier_block *nb, switch (action) { case PSERIES_RECONFIG_ADD: err = of_finish_dynamic_node(node); - if (err < 0) { + if (err < 0) printk(KERN_ERR "finish_node returned %d\n", err); - err = NOTIFY_BAD; - } break; default: - err = NOTIFY_DONE; + err = 0; break; } - return err; + return notifier_from_errno(err); } static struct notifier_block prom_reconfig_nb = { diff --git a/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c b/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c index 46f13a3c5d09..bc0288501f17 100644 --- a/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c @@ -330,21 +330,17 @@ static void pseries_remove_processor(struct device_node *np) static int pseries_smp_notifier(struct notifier_block *nb, unsigned long action, void *node) { - int err = NOTIFY_OK; + int err = 0; switch (action) { case PSERIES_RECONFIG_ADD: - if (pseries_add_processor(node)) - err = NOTIFY_BAD; + err = pseries_add_processor(node); break; case PSERIES_RECONFIG_REMOVE: pseries_remove_processor(node); break; - default: - err = NOTIFY_DONE; - break; } - return err; + return notifier_from_errno(err); } static struct notifier_block pseries_smp_nb = { diff --git a/trunk/arch/powerpc/platforms/pseries/hotplug-memory.c b/trunk/arch/powerpc/platforms/pseries/hotplug-memory.c index 33867ec4a234..1eaefd661d36 100644 --- a/trunk/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/trunk/arch/powerpc/platforms/pseries/hotplug-memory.c @@ -197,27 +197,21 @@ static int pseries_drconf_memory(unsigned long *base, unsigned int action) static int pseries_memory_notifier(struct notifier_block *nb, unsigned long action, void *node) { - int err = NOTIFY_OK; + int err = 0; switch (action) { case PSERIES_RECONFIG_ADD: - if (pseries_add_memory(node)) - err = NOTIFY_BAD; + err = pseries_add_memory(node); break; case PSERIES_RECONFIG_REMOVE: - if (pseries_remove_memory(node)) - err = NOTIFY_BAD; + err = pseries_remove_memory(node); break; case PSERIES_DRCONF_MEM_ADD: case PSERIES_DRCONF_MEM_REMOVE: - if (pseries_drconf_memory(node, action)) - err = NOTIFY_BAD; - break; - default: - err = NOTIFY_DONE; + err = pseries_drconf_memory(node, action); break; } - return err; + return notifier_from_errno(err); } static struct notifier_block pseries_mem_nb = { diff --git a/trunk/arch/powerpc/platforms/pseries/reconfig.c b/trunk/arch/powerpc/platforms/pseries/reconfig.c index 286b6af3d55d..168651acdd83 100644 --- a/trunk/arch/powerpc/platforms/pseries/reconfig.c +++ b/trunk/arch/powerpc/platforms/pseries/reconfig.c @@ -114,9 +114,7 @@ int pSeries_reconfig_notify(unsigned long action, void *p) int err = blocking_notifier_call_chain(&pSeries_reconfig_chain, action, p); - if (err == NOTIFY_BAD) - return -ENOMEM; /* For now, safe to assume kmalloc failure */ - return 0; + return notifier_to_errno(err); } static int pSeries_reconfig_add_node(const char *path, struct property *proplist)