diff options
author | Hao Ge <gehao@kylinos.cn> | 2024-02-21 15:32:27 +0800 |
---|---|---|
committer | Andrew Morton <akpm@linux-foundation.org> | 2024-02-23 17:48:34 -0800 |
commit | 5bb1421422fa8955e741097e6371a1d3d0a9e54e (patch) | |
tree | 24f7f62ce75d52f3b8a048123b945778d81cad38 /mm | |
parent | cc864ebba5f612ce2960e7e09322a193e8fda0d7 (diff) |
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>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/page_alloc.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 51e13aa605ec..a9581cdf9649 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -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 |