From: Yasunori Goto <y-goto@jp.fujitsu.com>
To: Dave Hansen <haveblue@us.ibm.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-mm <linux-mm@kvack.org>,
Linux Kernel ML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Register sysfs file for hotpluged new node
Date: Wed, 17 May 2006 12:22:34 +0900 [thread overview]
Message-ID: <20060517101339.21AA.Y-GOTO@jp.fujitsu.com> (raw)
In-Reply-To: <1147791312.6623.95.camel@localhost.localdomain>
> On Tue, 2006-05-16 at 21:23 +0900, Yasunori Goto wrote:
> > +int arch_register_node(int num){
> > + int p_node;
> > + struct node *parent = NULL;
> > +
> > + if (!node_online(num))
> > + return 0;
> > + p_node = parent_node(num);
> > +
> > + if (p_node != num)
> > + parent = &node_devices[p_node].node;
> > +
> > + return register_node(&node_devices[num].node, num, parent);
> > +}
> > +
> > +void arch_unregister_node(int num)
> > +{
> > + unregister_node(&node_devices[num].node);
> > +}
> ...
> > +int arch_register_node(int i)
> > +{
> > + int error = 0;
> > +
> > + if (node_online(i)){
> > + int p_node = parent_node(i);
> > + struct node *parent = NULL;
> > +
> > + if (p_node != i)
> > + parent = &node_devices[p_node];
> > + error = register_node(&node_devices[i], i, parent);
> > + }
> > +
> > + return error;
> > +}
>
> While you're at it, can you consolidate these two functions? I don't
> see too much of a reason for keeping them separate. You can probably
> also kill the 'struct i386_node' since it is just a 'struct node'
> wrapper anyway.
Hmmmmmmmm.
I've worried that it can or can't be done. These codes look like midway of
registering hierarchies, because all of arch's parent_node() is just
parent_node(nid) = nid. I guess someone would like to make real code at
here. But, these might be just wrecks too. :-(
Ok. I'll try consolidate once. If there is a person who would like to
make something at here, he will complain. :-P
> I promise not to complain if you fix the i386 function's braces, too. ;)
Oops. Indeed.
--
Yasunori Goto
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2006-05-17 3:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-16 12:23 Yasunori Goto
2006-05-16 14:51 ` Dave Hansen
2006-05-17 5:48 ` Yasunori Goto
2006-05-16 14:55 ` Dave Hansen
2006-05-17 3:22 ` Yasunori Goto [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060517101339.21AA.Y-GOTO@jp.fujitsu.com \
--to=y-goto@jp.fujitsu.com \
--cc=akpm@osdl.org \
--cc=haveblue@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox