Commit 5bb14214 authored by Hao Ge's avatar Hao Ge Committed by Andrew Morton

mm/page_alloc: make bad_range() return bool

bad_range() can return bool, so let us change it.

Link: https://lkml.kernel.org/r/20240221073227.276234-1-gehao@kylinos.cnSigned-off-by: default avatarHao Ge <gehao@kylinos.cn>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent cc864ebb
...@@ -464,19 +464,19 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page) ...@@ -464,19 +464,19 @@ static int page_outside_zone_boundaries(struct zone *zone, struct page *page)
/* /*
* Temporary debugging check for pages not lying within a given zone. * Temporary debugging check for pages not lying within a given zone.
*/ */
static int __maybe_unused bad_range(struct zone *zone, struct page *page) static bool __maybe_unused bad_range(struct zone *zone, struct page *page)
{ {
if (page_outside_zone_boundaries(zone, page)) if (page_outside_zone_boundaries(zone, page))
return 1; return true;
if (zone != page_zone(page)) if (zone != page_zone(page))
return 1; return true;
return 0; return false;
} }
#else #else
static inline int __maybe_unused bad_range(struct zone *zone, struct page *page) static inline bool __maybe_unused bad_range(struct zone *zone, struct page *page)
{ {
return 0; return false;
} }
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment