mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00: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
1 changed files with 6 additions and 6 deletions
|
@ -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…
Add table
Reference in a new issue