diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/powerpc/kernel/prom.c | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-cpu.c | 10 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/hotplug-memory.c | 16 | ||||
-rw-r--r-- | arch/powerpc/platforms/pseries/reconfig.c | 4 |
4 files changed, 12 insertions, 26 deletions
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c index 534c50359e06..b8e6189298f4 100644 --- a/arch/powerpc/kernel/prom.c +++ b/arch/powerpc/kernel/prom.c | |||
@@ -849,16 +849,14 @@ static int prom_reconfig_notifier(struct notifier_block *nb, | |||
849 | switch (action) { | 849 | switch (action) { |
850 | case PSERIES_RECONFIG_ADD: | 850 | case PSERIES_RECONFIG_ADD: |
851 | err = of_finish_dynamic_node(node); | 851 | err = of_finish_dynamic_node(node); |
852 | if (err < 0) { | 852 | if (err < 0) |
853 | printk(KERN_ERR "finish_node returned %d\n", err); | 853 | printk(KERN_ERR "finish_node returned %d\n", err); |
854 | err = NOTIFY_BAD; | ||
855 | } | ||
856 | break; | 854 | break; |
857 | default: | 855 | default: |
858 | err = NOTIFY_DONE; | 856 | err = 0; |
859 | break; | 857 | break; |
860 | } | 858 | } |
861 | return err; | 859 | return notifier_from_errno(err); |
862 | } | 860 | } |
863 | 861 | ||
864 | static struct notifier_block prom_reconfig_nb = { | 862 | static struct notifier_block prom_reconfig_nb = { |
diff --git a/arch/powerpc/platforms/pseries/hotplug-cpu.c b/arch/powerpc/platforms/pseries/hotplug-cpu.c index 46f13a3c5d09..bc0288501f17 100644 --- a/arch/powerpc/platforms/pseries/hotplug-cpu.c +++ b/arch/powerpc/platforms/pseries/hotplug-cpu.c | |||
@@ -330,21 +330,17 @@ static void pseries_remove_processor(struct device_node *np) | |||
330 | static int pseries_smp_notifier(struct notifier_block *nb, | 330 | static int pseries_smp_notifier(struct notifier_block *nb, |
331 | unsigned long action, void *node) | 331 | unsigned long action, void *node) |
332 | { | 332 | { |
333 | int err = NOTIFY_OK; | 333 | int err = 0; |
334 | 334 | ||
335 | switch (action) { | 335 | switch (action) { |
336 | case PSERIES_RECONFIG_ADD: | 336 | case PSERIES_RECONFIG_ADD: |
337 | if (pseries_add_processor(node)) | 337 | err = pseries_add_processor(node); |
338 | err = NOTIFY_BAD; | ||
339 | break; | 338 | break; |
340 | case PSERIES_RECONFIG_REMOVE: | 339 | case PSERIES_RECONFIG_REMOVE: |
341 | pseries_remove_processor(node); | 340 | pseries_remove_processor(node); |
342 | break; | 341 | break; |
343 | default: | ||
344 | err = NOTIFY_DONE; | ||
345 | break; | ||
346 | } | 342 | } |
347 | return err; | 343 | return notifier_from_errno(err); |
348 | } | 344 | } |
349 | 345 | ||
350 | static struct notifier_block pseries_smp_nb = { | 346 | static struct notifier_block pseries_smp_nb = { |
diff --git a/arch/powerpc/platforms/pseries/hotplug-memory.c b/arch/powerpc/platforms/pseries/hotplug-memory.c index 33867ec4a234..1eaefd661d36 100644 --- a/arch/powerpc/platforms/pseries/hotplug-memory.c +++ b/arch/powerpc/platforms/pseries/hotplug-memory.c | |||
@@ -197,27 +197,21 @@ static int pseries_drconf_memory(unsigned long *base, unsigned int action) | |||
197 | static int pseries_memory_notifier(struct notifier_block *nb, | 197 | static int pseries_memory_notifier(struct notifier_block *nb, |
198 | unsigned long action, void *node) | 198 | unsigned long action, void *node) |
199 | { | 199 | { |
200 | int err = NOTIFY_OK; | 200 | int err = 0; |
201 | 201 | ||
202 | switch (action) { | 202 | switch (action) { |
203 | case PSERIES_RECONFIG_ADD: | 203 | case PSERIES_RECONFIG_ADD: |
204 | if (pseries_add_memory(node)) | 204 | err = pseries_add_memory(node); |
205 | err = NOTIFY_BAD; | ||
206 | break; | 205 | break; |
207 | case PSERIES_RECONFIG_REMOVE: | 206 | case PSERIES_RECONFIG_REMOVE: |
208 | if (pseries_remove_memory(node)) | 207 | err = pseries_remove_memory(node); |
209 | err = NOTIFY_BAD; | ||
210 | break; | 208 | break; |
211 | case PSERIES_DRCONF_MEM_ADD: | 209 | case PSERIES_DRCONF_MEM_ADD: |
212 | case PSERIES_DRCONF_MEM_REMOVE: | 210 | case PSERIES_DRCONF_MEM_REMOVE: |
213 | if (pseries_drconf_memory(node, action)) | 211 | err = pseries_drconf_memory(node, action); |
214 | err = NOTIFY_BAD; | ||
215 | break; | ||
216 | default: | ||
217 | err = NOTIFY_DONE; | ||
218 | break; | 212 | break; |
219 | } | 213 | } |
220 | return err; | 214 | return notifier_from_errno(err); |
221 | } | 215 | } |
222 | 216 | ||
223 | static struct notifier_block pseries_mem_nb = { | 217 | static struct notifier_block pseries_mem_nb = { |
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c index 286b6af3d55d..168651acdd83 100644 --- a/arch/powerpc/platforms/pseries/reconfig.c +++ b/arch/powerpc/platforms/pseries/reconfig.c | |||
@@ -114,9 +114,7 @@ int pSeries_reconfig_notify(unsigned long action, void *p) | |||
114 | int err = blocking_notifier_call_chain(&pSeries_reconfig_chain, | 114 | int err = blocking_notifier_call_chain(&pSeries_reconfig_chain, |
115 | action, p); | 115 | action, p); |
116 | 116 | ||
117 | if (err == NOTIFY_BAD) | 117 | return notifier_to_errno(err); |
118 | return -ENOMEM; /* For now, safe to assume kmalloc failure */ | ||
119 | return 0; | ||
120 | } | 118 | } |
121 | 119 | ||
122 | static int pSeries_reconfig_add_node(const char *path, struct property *proplist) | 120 | static int pSeries_reconfig_add_node(const char *path, struct property *proplist) |