From 2c43bd7f220681ae7f5d06f6b008f2e2ee7799b6 Mon Sep 17 00:00:00 2001 From: Johannes Wikner Date: Tue, 16 Jan 2024 20:18:56 +0100 Subject: [PATCH] pmm: remove unused find_max_avail_order Previously used but with the current pmm loop, there's no need for it. Signed-off-by: Johannes Wikner --- mm/pmm.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/mm/pmm.c b/mm/pmm.c index 2527ac7f..9bd39a48 100644 --- a/mm/pmm.c +++ b/mm/pmm.c @@ -262,15 +262,6 @@ static inline void add_frame(mfn_t mfn, unsigned int order) { list_add_tail(&frame->list, &free_frames[order]); } -static inline unsigned int find_max_avail_order(size_t size) { - for (unsigned int order = MAX_PAGE_ORDER; order > PAGE_ORDER_4K; order--) { - if (ORDER_TO_SIZE(order) <= size) - return order; - } - - return PAGE_ORDER_4K; -} - static unsigned find_first_avail_region(void) { addr_range_t range;