* [PATCH] mm: memory_hotplug: fix build error
@ 2012-12-11 8:05 Bob Liu
2012-12-11 8:21 ` Andrew Morton
0 siblings, 1 reply; 3+ messages in thread
From: Bob Liu @ 2012-12-11 8:05 UTC (permalink / raw)
To: akpm; +Cc: laijs, wency, jiang.liu, isimatu.yasuaki, linux-mm, Bob Liu
Fix below build error(and comment):
mm/memory_hotplug.c:646:14: error: ‘ZONE_HIGH’ undeclared (first use in this
function)
mm/memory_hotplug.c:646:14: note: each undeclared identifier is reported
only once for each function it appears in
make[1]: *** [mm/memory_hotplug.o] Error 1
Signed-off-by: Bob Liu <lliubbo@gmail.com>
---
mm/memory_hotplug.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
index ea71d0d..9e97530 100644
--- a/mm/memory_hotplug.c
+++ b/mm/memory_hotplug.c
@@ -636,14 +636,14 @@ static void node_states_check_changes_online(unsigned long nr_pages,
#ifdef CONFIG_HIGHMEM
/*
* If we have movable node, node_states[N_HIGH_MEMORY]
- * contains nodes which have zones of 0...ZONE_HIGH,
- * set zone_last to ZONE_HIGH.
+ * contains nodes which have zones of 0...ZONE_HIGHMEM,
+ * set zone_last to ZONE_HIGHMEM.
*
* If we don't have movable node, node_states[N_NORMAL_MEMORY]
* contains nodes which have zones of 0...ZONE_MOVABLE,
* set zone_last to ZONE_MOVABLE.
*/
- zone_last = ZONE_HIGH;
+ zone_last = ZONE_HIGHMEM;
if (N_MEMORY == N_HIGH_MEMORY)
zone_last = ZONE_MOVABLE;
--
1.7.9.5
--
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>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: memory_hotplug: fix build error
2012-12-11 8:05 [PATCH] mm: memory_hotplug: fix build error Bob Liu
@ 2012-12-11 8:21 ` Andrew Morton
2012-12-11 8:41 ` Bob Liu
0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2012-12-11 8:21 UTC (permalink / raw)
To: Bob Liu; +Cc: laijs, wency, jiang.liu, isimatu.yasuaki, linux-mm
On Tue, 11 Dec 2012 16:05:58 +0800 Bob Liu <lliubbo@gmail.com> wrote:
> Fix below build error(and comment):
> mm/memory_hotplug.c:646:14: error: ___ZONE_HIGH___ undeclared (first use in this
> function)
> mm/memory_hotplug.c:646:14: note: each undeclared identifier is reported
> only once for each function it appears in
> make[1]: *** [mm/memory_hotplug.o] Error 1
>
> Signed-off-by: Bob Liu <lliubbo@gmail.com>
> ---
> mm/memory_hotplug.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> index ea71d0d..9e97530 100644
> --- a/mm/memory_hotplug.c
> +++ b/mm/memory_hotplug.c
> @@ -636,14 +636,14 @@ static void node_states_check_changes_online(unsigned long nr_pages,
> #ifdef CONFIG_HIGHMEM
> /*
> * If we have movable node, node_states[N_HIGH_MEMORY]
> - * contains nodes which have zones of 0...ZONE_HIGH,
> - * set zone_last to ZONE_HIGH.
> + * contains nodes which have zones of 0...ZONE_HIGHMEM,
> + * set zone_last to ZONE_HIGHMEM.
> *
> * If we don't have movable node, node_states[N_NORMAL_MEMORY]
> * contains nodes which have zones of 0...ZONE_MOVABLE,
> * set zone_last to ZONE_MOVABLE.
> */
> - zone_last = ZONE_HIGH;
> + zone_last = ZONE_HIGHMEM;
> if (N_MEMORY == N_HIGH_MEMORY)
> zone_last = ZONE_MOVABLE;
Thanks - there are actually two sites. You only caught one because
CONFIG_HIGHMEM was missing its 'F'.
Guys, this isn't very good. Obviously this code wasn't tested well :(
I expect the combination of highmem and memory hotplug will never
exist, but it should at least compile.
--- a/mm/memory_hotplug.c~hotplug-update-nodemasks-management-fix
+++ a/mm/memory_hotplug.c
@@ -620,14 +620,14 @@ static void node_states_check_changes_on
#ifdef CONFIG_HIGHMEM
/*
* If we have movable node, node_states[N_HIGH_MEMORY]
- * contains nodes which have zones of 0...ZONE_HIGH,
- * set zone_last to ZONE_HIGH.
+ * contains nodes which have zones of 0...ZONE_HIGHMEM,
+ * set zone_last to ZONE_HIGHMEM.
*
* If we don't have movable node, node_states[N_NORMAL_MEMORY]
* contains nodes which have zones of 0...ZONE_MOVABLE,
* set zone_last to ZONE_MOVABLE.
*/
- zone_last = ZONE_HIGH;
+ zone_last = ZONE_HIGHMEM;
if (N_MEMORY == N_HIGH_MEMORY)
zone_last = ZONE_MOVABLE;
@@ -1151,17 +1151,17 @@ static void node_states_check_changes_of
else
arg->status_change_nid_normal = -1;
-#ifdef CONIG_HIGHMEM
+#ifdef CONFIG_HIGHMEM
/*
* If we have movable node, node_states[N_HIGH_MEMORY]
- * contains nodes which have zones of 0...ZONE_HIGH,
- * set zone_last to ZONE_HIGH.
+ * contains nodes which have zones of 0...ZONE_HIGHMEM,
+ * set zone_last to ZONE_HIGHMEM.
*
* If we don't have movable node, node_states[N_NORMAL_MEMORY]
* contains nodes which have zones of 0...ZONE_MOVABLE,
* set zone_last to ZONE_MOVABLE.
*/
- zone_last = ZONE_HIGH;
+ zone_last = ZONE_HIGHMEM;
if (N_MEMORY == N_HIGH_MEMORY)
zone_last = ZONE_MOVABLE;
_
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mm: memory_hotplug: fix build error
2012-12-11 8:21 ` Andrew Morton
@ 2012-12-11 8:41 ` Bob Liu
0 siblings, 0 replies; 3+ messages in thread
From: Bob Liu @ 2012-12-11 8:41 UTC (permalink / raw)
To: Andrew Morton; +Cc: laijs, wency, jiang.liu, isimatu.yasuaki, linux-mm
On Tue, Dec 11, 2012 at 4:21 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
> On Tue, 11 Dec 2012 16:05:58 +0800 Bob Liu <lliubbo@gmail.com> wrote:
>
>> Fix below build error(and comment):
>> mm/memory_hotplug.c:646:14: error: ___ZONE_HIGH___ undeclared (first use in this
>> function)
>> mm/memory_hotplug.c:646:14: note: each undeclared identifier is reported
>> only once for each function it appears in
>> make[1]: *** [mm/memory_hotplug.o] Error 1
>>
>> Signed-off-by: Bob Liu <lliubbo@gmail.com>
>> ---
>> mm/memory_hotplug.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
>> index ea71d0d..9e97530 100644
>> --- a/mm/memory_hotplug.c
>> +++ b/mm/memory_hotplug.c
>> @@ -636,14 +636,14 @@ static void node_states_check_changes_online(unsigned long nr_pages,
>> #ifdef CONFIG_HIGHMEM
>> /*
>> * If we have movable node, node_states[N_HIGH_MEMORY]
>> - * contains nodes which have zones of 0...ZONE_HIGH,
>> - * set zone_last to ZONE_HIGH.
>> + * contains nodes which have zones of 0...ZONE_HIGHMEM,
>> + * set zone_last to ZONE_HIGHMEM.
>> *
>> * If we don't have movable node, node_states[N_NORMAL_MEMORY]
>> * contains nodes which have zones of 0...ZONE_MOVABLE,
>> * set zone_last to ZONE_MOVABLE.
>> */
>> - zone_last = ZONE_HIGH;
>> + zone_last = ZONE_HIGHMEM;
>> if (N_MEMORY == N_HIGH_MEMORY)
>> zone_last = ZONE_MOVABLE;
>
> Thanks - there are actually two sites. You only caught one because
> CONFIG_HIGHMEM was missing its 'F'.
>
Hmm...You are right.
Sorry for not take more time on it.
>
> Guys, this isn't very good. Obviously this code wasn't tested well :(
>
> I expect the combination of highmem and memory hotplug will never
> exist, but it should at least compile.
>
Agree.
>
>
> --- a/mm/memory_hotplug.c~hotplug-update-nodemasks-management-fix
> +++ a/mm/memory_hotplug.c
> @@ -620,14 +620,14 @@ static void node_states_check_changes_on
> #ifdef CONFIG_HIGHMEM
> /*
> * If we have movable node, node_states[N_HIGH_MEMORY]
> - * contains nodes which have zones of 0...ZONE_HIGH,
> - * set zone_last to ZONE_HIGH.
> + * contains nodes which have zones of 0...ZONE_HIGHMEM,
> + * set zone_last to ZONE_HIGHMEM.
> *
> * If we don't have movable node, node_states[N_NORMAL_MEMORY]
> * contains nodes which have zones of 0...ZONE_MOVABLE,
> * set zone_last to ZONE_MOVABLE.
> */
> - zone_last = ZONE_HIGH;
> + zone_last = ZONE_HIGHMEM;
> if (N_MEMORY == N_HIGH_MEMORY)
> zone_last = ZONE_MOVABLE;
>
> @@ -1151,17 +1151,17 @@ static void node_states_check_changes_of
> else
> arg->status_change_nid_normal = -1;
>
> -#ifdef CONIG_HIGHMEM
> +#ifdef CONFIG_HIGHMEM
> /*
> * If we have movable node, node_states[N_HIGH_MEMORY]
> - * contains nodes which have zones of 0...ZONE_HIGH,
> - * set zone_last to ZONE_HIGH.
> + * contains nodes which have zones of 0...ZONE_HIGHMEM,
> + * set zone_last to ZONE_HIGHMEM.
> *
> * If we don't have movable node, node_states[N_NORMAL_MEMORY]
> * contains nodes which have zones of 0...ZONE_MOVABLE,
> * set zone_last to ZONE_MOVABLE.
> */
> - zone_last = ZONE_HIGH;
> + zone_last = ZONE_HIGHMEM;
> if (N_MEMORY == N_HIGH_MEMORY)
> zone_last = ZONE_MOVABLE;
>
> _
>
--
Regards,
--Bob
--
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>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-12-11 8:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-11 8:05 [PATCH] mm: memory_hotplug: fix build error Bob Liu
2012-12-11 8:21 ` Andrew Morton
2012-12-11 8:41 ` Bob Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).