[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100514051945.GA5438@shaohui>
Date: Fri, 14 May 2010 13:19:45 +0800
From: Shaohui Zheng <shaohui.zheng@...el.com>
To: Wu Fengguang <fengguang.wu@...el.com>
Cc: Haicheng Li <haicheng.li@...ux.intel.com>,
"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"linux-mm@...ck.org" <linux-mm@...ck.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>,
"H. Peter Anvin" <hpa@...or.com>,
"x86@...nel.org" <x86@...nel.org>,
Hidetoshi Seto <seto.hidetoshi@...fujitsu.com>,
Greg Kroah-Hartman <gregkh@...e.de>,
David Rientjes <rientjes@...gle.com>,
Alex Chiang <achiang@...com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"ak@...ux.intel.co" <ak@...ux.intel.co>,
"shaohui.zheng@...ux.intel.com" <shaohui.zheng@...ux.intel.com>
Subject: Re: [RFC, 3/7] NUMA hotplug emulator
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists