From: keith mannthey <kmannth@us.ibm.com>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: lkml <linux-kernel@vger.kernel.org>,
lhms-devel <lhms-devel@lists.sourceforge.net>,
"y-goto@jp.fujitsu.com" <y-goto@jp.fujitsu.com>,
Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] memory hotadd fixes [5/5] avoid registering res twice
Date: Thu, 03 Aug 2006 17:23:30 -0700 [thread overview]
Message-ID: <1154651010.5925.56.camel@keithlap> (raw)
In-Reply-To: <20060803123716.2e00952a.kamezawa.hiroyu@jp.fujitsu.com>
On Thu, 2006-08-03 at 12:37 +0900, KAMEZAWA Hiroyuki wrote:
> both of acpi_memory_enable_device() and acpi_memory_add_device()
> may evaluate _CRS method.
>
> We should avoid evaluate device's resource twice if we could get it
> successfully in past.
>
> Signed-Off-By: KAMEZWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
>
> drivers/acpi/acpi_memhotplug.c | 4 ++++
> 1 files changed, 4 insertions(+)
>
> Index: linux-2.6.18-rc3/drivers/acpi/acpi_memhotplug.c
> ===================================================================
> --- linux-2.6.18-rc3.orig/drivers/acpi/acpi_memhotplug.c 2006-08-02 14:12:45.000000000 +0900
> +++ linux-2.6.18-rc3/drivers/acpi/acpi_memhotplug.c 2006-08-02 14:24:10.000000000 +0900
> @@ -129,11 +129,15 @@
> struct acpi_memory_info *info, *n;
>
>
> + if (!list_empty(&mem_device->res_list))
> + return 0;
> +
> status = acpi_walk_resources(mem_device->device->handle, METHOD_NAME__CRS,
> acpi_memory_get_resource, mem_device);
> if (ACPI_FAILURE(status)) {
> list_for_each_entry_safe(info, n, &mem_device->res_list, list)
> kfree(info);
> + INIT_LIST_HEAD(&mem_device->res_list);
> return -EINVAL;
> }
Looks fine to me.
Acked-By: Keith Mannthey <kmannth@us.ibm.com>
prev parent reply other threads:[~2006-08-04 0:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-08-03 3:37 [PATCH] memory hotadd fixes [5/5] avoid registering res twice KAMEZAWA Hiroyuki
2006-08-04 0:23 ` keith mannthey [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=1154651010.5925.56.camel@keithlap \
--to=kmannth@us.ibm.com \
--cc=akpm@osdl.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=lhms-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.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