From e79b1f0fc15919648c0a8e4e43ef12aaaaae006f Mon Sep 17 00:00:00 2001 From: Doug Moore Date: Sun, 20 Apr 2025 22:48:57 -0500 Subject: [PATCH] powerpc: silence compiler warning Function moea64_sp_demote_aligned() is only invoked if VM_NRESERVLEVEL > 0. Add #if/#endif pairs around the declaration and definition of that function to silence warnings about unused static functions. Reviewed by: kib --- sys/powerpc/aim/mmu_oea64.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c index 273dc38214e2..7e23d73557a5 100644 --- a/sys/powerpc/aim/mmu_oea64.c +++ b/sys/powerpc/aim/mmu_oea64.c @@ -364,7 +364,9 @@ static int moea64_sp_enter(pmap_t pmap, vm_offset_t va, static struct pvo_entry *moea64_sp_remove(struct pvo_entry *sp, struct pvo_dlist *tofree); +#if VM_NRESERVLEVEL > 0 static void moea64_sp_promote(pmap_t pmap, vm_offset_t va, vm_page_t m); +#endif static void moea64_sp_demote_aligned(struct pvo_entry *sp); static void moea64_sp_demote(struct pvo_entry *pvo); @@ -3794,6 +3796,7 @@ moea64_sp_enter(pmap_t pmap, vm_offset_t va, vm_page_t m, return (KERN_SUCCESS); } +#if VM_NRESERVLEVEL > 0 static void moea64_sp_promote(pmap_t pmap, vm_offset_t va, vm_page_t m) { @@ -3920,6 +3923,7 @@ error: atomic_add_long(&sp_p_failures, 1); PMAP_UNLOCK(pmap); } +#endif static void moea64_sp_demote_aligned(struct pvo_entry *sp)