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.cn
Signed-off-by: Hao Ge <gehao@kylinos.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
Hao Ge 2024-02-21 15:32:27 +08:00 committed by Andrew Morton
parent cc864ebba5
commit 5bb1421422

View File

@ -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.
*/
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))
return 1;
return true;
if (zone != page_zone(page))
return 1;
return true;
return 0;
return false;
}
#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