mm: refactor zone_movable_is_highmem()
Subsystems (3)
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 1/1 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 <[email protected]>
--- include/linux/mmzone.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
include/linux/mmzone.h +4 -4
@@ -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) {
Signature · 13 lines
1.8.5.5 . -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 4 lines · Zhang Zhen
All callers of
zone_movable_is_highmemare under #ifdefCONFIG_HIGHMEM, so the else branch return 0 is not needed.Signed-off-by Zhang Zhen <[email protected]>
Acked-by David Rientjes <[email protected]>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>