mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-16 07:24:39 +08:00
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:
parent
cc864ebba5
commit
5bb1421422
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user