linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dave Hansen <haveblue@us.ibm.com>
To: Yasunori Goto <y-goto@jp.fujitsu.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: Tue, 16 May 2006 07:55:12 -0700	[thread overview]
Message-ID: <1147791312.6623.95.camel@localhost.localdomain> (raw)
In-Reply-To: <20060516210608.A3E5.Y-GOTO@jp.fujitsu.com>

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.  

I promise not to complain if you fix the i386 function's braces, too. ;)

-- Dave

--
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>

  parent reply	other threads:[~2006-05-16 15:07 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 [this message]
2006-05-17  3:22   ` Yasunori Goto

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=1147791312.6623.95.camel@localhost.localdomain \
    --to=haveblue@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=y-goto@jp.fujitsu.com \
    /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