On Mon, Nov 16, 2015 at 01:45:01PM +0100, Michal Hocko wrote: > On Mon 16-11-15 14:51:26, Yaowei Bai wrote: > [...] > > @@ -72,16 +72,10 @@ struct zoneref *next_zones_zonelist(struct zoneref *z, > > } > > > > #ifdef CONFIG_ARCH_HAS_HOLES_MEMORYMODEL > > -int memmap_valid_within(unsigned long pfn, > > +bool memmap_valid_within(unsigned long pfn, > > struct page *page, struct zone *zone) > > { > > - if (page_to_pfn(page) != pfn) > > - return 0; > > - > > - if (page_zone(page) != zone) > > - return 0; > > - > > - return 1; > > + return page_to_pfn(page) == pfn && page_zone(page) == zone; > > I do not think this is easier to read. Quite contrary OK, so we can just make it return ture/false without refactoring it. > > > } > > #endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */ > > > > -- > > 1.9.1 > > > > > > -- > Michal Hocko > SUSE Labs -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>