Re: [patch] cpu topology: consider sysfs_create_group return value

From: Cornelia Huck
Date: Mon Oct 16 2006 - 04:55:35 EST


On Mon, 16 Oct 2006 09:31:26 +0200,
Heiko Carstens <heiko.carstens@xxxxxxxxxx> wrote:

> From: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
>
> [patch] cpu topology: consider sysfs_create_group return value.
>
> Take return value of sysfs_create_group() into account. That function got
> called in case of CPU_ONLINE notification. Since callbacks are not allowed
> to fail on CPU_ONLINE notification do the sysfs group creation on
> CPU_UP_PREPARE notification.
> Also remember if creation succeeded in a bitmask. So it's possible to know
> wether it's legal to call sysfs_remove_group or not.
>
> In addition some other minor stuff:
>
> - since CPU_UP_PREPARE might fail add CPU_UP_CANCELED handling as well.
> - use hotcpu_notifier instead of register_hotcpu_notifier.
> - #ifdef code that isn't needed in the !CONFIG_HOTPLUG_CPU case.
>
> Signed-off-by: Heiko Carstens <heiko.carstens@xxxxxxxxxx>
> ---
>
> drivers/base/topology.c | 56 +++++++++++++++++++++++++++---------------------
> 1 file changed, 32 insertions(+), 24 deletions(-)

Looks good.

Reviewed-by: Cornelia Huck <cornelia.huck@xxxxxxxxxx>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/