lkml.org 
[lkml]   [2015]   [Nov]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 7/7] mm/mmzone: refactor memmap_valid_within
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

> }
> #endif /* CONFIG_ARCH_HAS_HOLES_MEMORYMODEL */
>
> --
> 1.9.1
>
>

--
Michal Hocko
SUSE Labs


\
 
 \ /
  Last update: 2015-11-16 14:01    [W:0.119 / U:11.632 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site