* [PATCH] mm/page_alloc: Make bad_range return bool
@ 2024-02-21 7:32 Hao Ge
0 siblings, 0 replies; only message in thread
From: Hao Ge @ 2024-02-21 7:32 UTC (permalink / raw)
To: akpm; +Cc: linux-mm, linux-kernel, gehao618, Hao Ge
bad_range can return bool,so let us to change it.
Signed-off-by: Hao Ge <gehao@kylinos.cn>
---
mm/page_alloc.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 150d4f23b010..8b5c31cb50c2 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
--
2.25.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-02-21 7:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-21 7:32 [PATCH] mm/page_alloc: Make bad_range return bool Hao Ge
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox