From: Zhang Zhen Date: Wed, 15 Apr 2015 23:12:57 +0000 (-0700) Subject: mm: refactor zone_movable_is_highmem() X-Git-Tag: v4.9.8~4446^2~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d7e4a2ea51c1b0ac0b2d53f5ab4a2e878b1c4aec;p=platform%2Fkernel%2Flinux-rpi3.git mm: refactor zone_movable_is_highmem() 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 Acked-by: David Rientjes Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 2782df4..54d74f6 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -842,16 +842,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) {