From: Andrew Morton <akpm@linux-foundation.org>
To: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-mm@kvack.org, Tang Chen <tangchen@cn.fujitsu.com>,
Wen Congyang <wency@cn.fujitsu.com>,
Lai Jiangshan <laijs@cn.fujitsu.com>
Subject: Re: mmotm 2013-01-18-15-48 uploaded (memory_hotplug.c)
Date: Wed, 23 Jan 2013 13:12:55 -0800 [thread overview]
Message-ID: <20130123131255.756b65b2.akpm@linux-foundation.org> (raw)
In-Reply-To: <50FAF197.5010700@infradead.org>
On Sat, 19 Jan 2013 11:18:47 -0800
Randy Dunlap <rdunlap@infradead.org> wrote:
> On 01/18/13 15:49, akpm@linux-foundation.org wrote:
> > The mm-of-the-moment snapshot 2013-01-18-15-48 has been uploaded to
> >
> > http://www.ozlabs.org/~akpm/mmotm/
> >
> > mmotm-readme.txt says
> >
> > README for mm-of-the-moment:
> >
> > http://www.ozlabs.org/~akpm/mmotm/
> >
> > This is a snapshot of my -mm patch queue. Uploaded at random hopefully
> > more than once a week.
> >
>
>
> mm/memory_hotplug.c:1092:29: warning: the address of 'contig_page_data' will always evaluate as 'true' [-Waddress]
>
yup, due to
new_pgdat = NODE_DATA(nid) ? 0 : 1;
and
#ifndef CONFIG_NEED_MULTIPLE_NODES
extern struct pglist_data contig_page_data;
#define NODE_DATA(nid) (&contig_page_data)
This fixes it and removes a couple of unneeded initialisations.
From: Andrew Morton <akpm@linux-foundation.org>
Subject: memory-hotplug-do-not-allocate-pdgat-if-it-was-not-freed-when-offline-fix
fix warning when CONFIG_NEED_MULTIPLE_NODES=n
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Jiang Liu <jiang.liu@huawei.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: Tang Chen <tangchen@cn.fujitsu.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Wu Jianguo <wujianguo@huawei.com>
Cc: Yasuaki Ishimatsu <isimatu.yasuaki@jp.fujitsu.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
mm/memory_hotplug.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff -puN mm/memory_hotplug.c~memory-hotplug-do-not-allocate-pdgat-if-it-was-not-freed-when-offline-fix mm/memory_hotplug.c
--- a/mm/memory_hotplug.c~memory-hotplug-do-not-allocate-pdgat-if-it-was-not-freed-when-offline-fix
+++ a/mm/memory_hotplug.c
@@ -1077,7 +1077,8 @@ out:
int __ref add_memory(int nid, u64 start, u64 size)
{
pg_data_t *pgdat = NULL;
- int new_pgdat = 0, new_node = 0;
+ bool new_pgdat;
+ bool new_node;
struct resource *res;
int ret;
@@ -1088,8 +1089,8 @@ int __ref add_memory(int nid, u64 start,
if (!res)
goto out;
- new_pgdat = NODE_DATA(nid) ? 0 : 1;
- new_node = node_online(nid) ? 0 : 1;
+ new_pgdat = (NODE_DATA(nid) == NULL);
+ new_node = !node_online(nid);
if (new_node) {
pgdat = hotadd_new_pgdat(nid, start);
ret = -ENOMEM;
_
--
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-01-23 21:12 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 23:49 mmotm 2013-01-18-15-48 uploaded akpm
2013-01-18 23:49 ` akpm
2013-01-19 10:56 ` Zlatko Calusic
2013-01-19 19:18 ` mmotm 2013-01-18-15-48 uploaded (memory_hotplug.c) Randy Dunlap
2013-01-23 21:12 ` Andrew Morton [this message]
2013-01-19 19:28 ` [ath9k-devel] mmotm 2013-01-18-15-48 uploaded (ath9k) Randy Dunlap
2013-01-19 19:28 ` Randy Dunlap
2013-01-19 19:28 ` Randy Dunlap
2013-01-19 19:39 ` mmotm 2013-01-18-15-48 uploaded (sched/stats.c) Randy Dunlap
2013-01-22 16:10 ` Nathan Zimmer
2013-01-22 18:49 ` Randy Dunlap
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=20130123131255.756b65b2.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-mm@kvack.org \
--cc=rdunlap@infradead.org \
--cc=tangchen@cn.fujitsu.com \
--cc=wency@cn.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.