Skip to content

Commit

Permalink
mm/page_alloc.c: replace the definition of NR_MIGRATETYPE_BITS with P…
Browse files Browse the repository at this point in the history
…B_migratetype_bits

We already have the definition of PB_migratetype_bits and current
NR_MIGRATETYPE_BITS looks like a cyclic definition.

Just use PB_migratetype_bits is enough.

Signed-off-by: Wei Yang <richard.weiyang@linux.alibaba.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Mel Gorman <mgorman@suse.de>
Link: http://lkml.kernel.org/r/20200623124201.8199-1-richard.weiyang@linux.alibaba.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wei Yang authored and Linus Torvalds committed Aug 7, 2020
1 parent 8391953 commit d38ac97
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/linux/mmzone.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@ static inline bool is_migrate_movable(int mt)

extern int page_group_by_mobility_disabled;

#define NR_MIGRATETYPE_BITS (PB_migrate_end - PB_migrate + 1)
#define MIGRATETYPE_MASK ((1UL << NR_MIGRATETYPE_BITS) - 1)
#define MIGRATETYPE_MASK ((1UL << PB_migratetype_bits) - 1)

#define get_pageblock_migratetype(page) \
get_pfnblock_flags_mask(page, page_to_pfn(page), \
Expand Down

0 comments on commit d38ac97

Please sign in to comment.