Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d7e4a2ea authored by Zhang Zhen's avatar Zhang Zhen Committed by Linus Torvalds
Browse files

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: default avatarZhang Zhen <zhenzhang.zhang@huawei.com>
Acked-by: default avatarDavid Rientjes <rientjes@google.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bdddbcd4
Loading
Loading
Loading
Loading
+4 −4
Original line number Original line Diff line number Diff line
@@ -842,16 +842,16 @@ static inline int populated_zone(struct zone *zone)


extern int movable_zone;
extern int movable_zone;


#ifdef CONFIG_HIGHMEM
static inline int zone_movable_is_highmem(void)
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;
	return movable_zone == ZONE_HIGHMEM;
#elif defined(CONFIG_HIGHMEM)
	return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM;
#else
#else
	return 0;
	return (ZONE_MOVABLE - 1) == ZONE_HIGHMEM;
#endif
#endif
}
}
#endif


static inline int is_highmem_idx(enum zone_type idx)
static inline int is_highmem_idx(enum zone_type idx)
{
{