Re: [RFC, 3/7] NUMA hotplug emulator

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 14, 2010 at 12:11:36PM +0800, Wu Fengguang wrote:
> > Pls. replace it with following code:
> > 
> > +#ifdef CONFIG_NODE_HOTPLUG_EMU
> > +static ssize_t store_nodes_probe(struct sysdev_class *class,
> > +                                 struct sysdev_class_attribute *attr,
> > +                                 const char *buf, size_t count)
> > +{
> > +       long nid;
> > +       int ret;
> > +
> > +       ret = strict_strtol(buf, 0, &nid);
> > +       if (ret == -EINVAL)
> > +               return ret;
> > +
> > +       ret = hotadd_hidden_nodes(nid);
> > +       if (!ret)
> > +               return count;
> > +       else
> > +               return -EIO;
> > +}
> > +#endif
> 
> How about this?
> 
>        err = strict_strtol(buf, 0, &nid);
>        if (err < 0)
>                return err;
> 
>        err = hotadd_hidden_nodes(nid);
>        if (err < 0)
>                return err;
> 
>        return count;
> 
> Thanks,
> Fengguang

Both seems good.

Haicheng's code is prefered, since it was already reviewed.

-- 
Thanks & Regards,
Shaohui

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@xxxxxxxxxx  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@xxxxxxxxx";> email@xxxxxxxxx </a>

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]