diff mbox series

[v2,05/13] mm: page_alloc: squash page_is_consistent()

Message ID 20230516063821.121844-6-wangkefeng.wang@huawei.com (mailing list archive)
State Handled Elsewhere, archived
Headers show
Series mm: page_alloc: misc cleanup and refector | expand

Commit Message

Kefeng Wang May 16, 2023, 6:38 a.m. UTC
Squash the page_is_consistent() into bad_range() as there is
only one caller.

Reviewed-by: Mike Rapoport (IBM) <rppt@kernel.org>
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
---
 mm/page_alloc.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
diff mbox series

Patch

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 84ba6cca3b3a..1bd8b7832d40 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -517,13 +517,6 @@  static int page_outside_zone_boundaries(struct zone *zone, struct page *page)
 	return ret;
 }
 
-static int page_is_consistent(struct zone *zone, struct page *page)
-{
-	if (zone != page_zone(page))
-		return 0;
-
-	return 1;
-}
 /*
  * Temporary debugging check for pages not lying within a given zone.
  */
@@ -531,7 +524,7 @@  static int __maybe_unused bad_range(struct zone *zone, struct page *page)
 {
 	if (page_outside_zone_boundaries(zone, page))
 		return 1;
-	if (!page_is_consistent(zone, page))
+	if (zone != page_zone(page))
 		return 1;
 
 	return 0;