All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mm: refactor zone_movable_is_highmem()
       [not found] <1425972055-53804-1-git-send-email-zhenzhang.zhang@huawei.com>
@ 2015-03-10  7:24 ` Zhang Zhen
  2015-03-10 19:19   ` David Rientjes
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Zhen @ 2015-03-10  7:24 UTC (permalink / raw)
  To: Linux MM, Andrew Morton, iamjoonsoo.kim; +Cc: David Rientjes, Dave Hansen

All callers of zone_movable_is_highmem are under #ifdef CONFIG_HIGHMEM,
so the else branch return 0 is not needed.

Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>
---
 include/linux/mmzone.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index f279d9c..218f892 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -843,16 +843,16 @@ static inline int populated_zone(struct zone *zone)

 extern int movable_zone;

+#ifdef CONFIG_HIGHMEM
 static inline int zone_movable_is_highmem(void)
 {
-#if defined(CONFIG_HIGHMEM) && defined(CONFIG_HAVE_MEMBLOCK_NODE_MAP)
+#ifdef CONFIG_HAVE_MEMBLOCK_NODE_MAP
 	return movable_zone == ZONE_HIGHMEM;
-#elif defined(CONFIG_HIGHMEM)
-	return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM;
 #else
-	return 0;
+	return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM;
 #endif
 }
+#endif

 static inline int is_highmem_idx(enum zone_type idx)
 {
-- 
1.8.5.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] 2+ messages in thread

* Re: [PATCH] mm: refactor zone_movable_is_highmem()
  2015-03-10  7:24 ` [PATCH] mm: refactor zone_movable_is_highmem() Zhang Zhen
@ 2015-03-10 19:19   ` David Rientjes
  0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2015-03-10 19:19 UTC (permalink / raw)
  To: Zhang Zhen; +Cc: Linux MM, Andrew Morton, iamjoonsoo.kim, Dave Hansen

On Tue, 10 Mar 2015, Zhang Zhen wrote:

> All callers of zone_movable_is_highmem are under #ifdef CONFIG_HIGHMEM,
> so the else branch return 0 is not needed.
> 
> Signed-off-by: Zhang Zhen <zhenzhang.zhang@huawei.com>

Acked-by: David Rientjes <rientjes@google.com>

--
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] 2+ messages in thread

end of thread, other threads:[~2015-03-10 19:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1425972055-53804-1-git-send-email-zhenzhang.zhang@huawei.com>
2015-03-10  7:24 ` [PATCH] mm: refactor zone_movable_is_highmem() Zhang Zhen
2015-03-10 19:19   ` David Rientjes

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.