From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Jianguo Wu <wujianguo@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
lenb@kernel.org, linux-acpi@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] mm/acpi: use NUMA_NO_NODE
Date: Fri, 30 Aug 2013 14:07:37 +0200 [thread overview]
Message-ID: <1489693.CsKFcLgBvu@vostro.rjw.lan> (raw)
In-Reply-To: <521FF494.6000504@huawei.com>
On Friday, August 30, 2013 09:25:40 AM Jianguo Wu wrote:
> Use more appropriate NUMA_NO_NODE instead of -1
>
> Signed-off-by: Jianguo Wu <wujianguo@huawei.com>
I'll queue this up for 3.13.
Thanks,
Rafael
> ---
> drivers/acpi/acpi_memhotplug.c | 2 +-
> drivers/acpi/numa.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
> index 999adb5..c00a3a7 100644
> --- a/drivers/acpi/acpi_memhotplug.c
> +++ b/drivers/acpi/acpi_memhotplug.c
> @@ -281,7 +281,7 @@ static void acpi_memory_remove_memory(struct acpi_memory_device *mem_device)
> if (!info->enabled)
> continue;
>
> - if (nid < 0)
> + if (nid == NUMA_NO_NODE)
> nid = memory_add_physaddr_to_nid(info->start_addr);
>
> acpi_unbind_memory_blocks(info, handle);
> diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c
> index 33e609f..09f79a2 100644
> --- a/drivers/acpi/numa.c
> +++ b/drivers/acpi/numa.c
> @@ -73,7 +73,7 @@ int acpi_map_pxm_to_node(int pxm)
> {
> int node = pxm_to_node_map[pxm];
>
> - if (node < 0) {
> + if (node == NUMA_NO_NODE) {
> if (nodes_weight(nodes_found_map) >= MAX_NUMNODES)
> return NUMA_NO_NODE;
> node = first_unset_node(nodes_found_map);
> @@ -334,7 +334,7 @@ int acpi_get_pxm(acpi_handle h)
>
> int acpi_get_node(acpi_handle *handle)
> {
> - int pxm, node = -1;
> + int pxm, node = NUMA_NO_NODE;
>
> pxm = acpi_get_pxm(handle);
> if (pxm >= 0 && pxm < MAX_PXM_DOMAINS)
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
--
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>
next prev parent reply other threads:[~2013-08-30 11:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-30 1:25 Jianguo Wu
2013-08-30 12:07 ` Rafael J. Wysocki [this message]
2013-08-30 21:48 ` David Rientjes
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=1489693.CsKFcLgBvu@vostro.rjw.lan \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=wujianguo@huawei.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