Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 259127
b: refs/heads/master
c: de2780a
h: refs/heads/master
i:
  259125: 3568855
  259123: 4ae00da
  259119: 9a8c993
v: v3
  • Loading branch information
Akinobu Mita authored and Benjamin Herrenschmidt committed Jun 29, 2011
1 parent e23b7d4 commit b05c9cc
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 27 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3aef19f0a10d1c274a15191766b627fe550d456e
refs/heads/master: de2780a3d82372a6bfc7f474905e346c0f26dfa4
8 changes: 3 additions & 5 deletions trunk/arch/powerpc/kernel/prom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
10 changes: 3 additions & 7 deletions trunk/arch/powerpc/platforms/pseries/hotplug-cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
16 changes: 5 additions & 11 deletions trunk/arch/powerpc/platforms/pseries/hotplug-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 1 addition & 3 deletions trunk/arch/powerpc/platforms/pseries/reconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b05c9cc

Please sign in to comment.