git: 8119cdd38b4f - main - vm_phys: hide vm_phys_set_pool

From: Doug Moore <dougm_at_FreeBSD.org>
Date: Wed, 29 Dec 2021 17:17:48 UTC
The branch main has been updated by dougm:

URL: https://cgit.FreeBSD.org/src/commit/?id=8119cdd38b4f3ebdba92d8d0658fabbc04a1f238

commit 8119cdd38b4f3ebdba92d8d0658fabbc04a1f238
Author:     Doug Moore <dougm@FreeBSD.org>
AuthorDate: 2021-12-29 17:10:31 +0000
Commit:     Doug Moore <dougm@FreeBSD.org>
CommitDate: 2021-12-29 17:17:33 +0000

    vm_phys: hide vm_phys_set_pool
    
    It is only called in the file that defines it, so make it static and
    remove the declaration from the header.
    
    Reviewed by:    kib
    Differential Revision:  https://reviews.freebsd.org/D33688
---
 sys/vm/vm_phys.c | 25 ++++++++++++-------------
 sys/vm/vm_phys.h |  1 -
 2 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c
index b0aaa822211f..ad997581e77c 100644
--- a/sys/vm/vm_phys.c
+++ b/sys/vm/vm_phys.c
@@ -179,7 +179,6 @@ static void _vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end, int domain);
 static void vm_phys_create_seg(vm_paddr_t start, vm_paddr_t end);
 static void vm_phys_split_pages(vm_page_t m, int oind, struct vm_freelist *fl,
     int order, int tail);
-
 /*
  * Red-black tree helpers for vm fictitious range management.
  */
@@ -711,6 +710,18 @@ vm_phys_enq_range(vm_page_t m, u_int npages, struct vm_freelist *fl, int tail)
 	} while (npages > 0);
 }
 
+/*
+ * Set the pool for a contiguous, power of two-sized set of physical pages. 
+ */
+static void
+vm_phys_set_pool(int pool, vm_page_t m, int order)
+{
+	vm_page_t m_tmp;
+
+	for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++)
+		m_tmp->pool = pool;
+}
+
 /*
  * Tries to allocate the specified number of pages from the specified pool
  * within the specified domain.  Returns the actual number of allocated pages
@@ -1273,18 +1284,6 @@ vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low, vm_paddr_t high,
 	return (NULL);
 }
 
-/*
- * Set the pool for a contiguous, power of two-sized set of physical pages. 
- */
-void
-vm_phys_set_pool(int pool, vm_page_t m, int order)
-{
-	vm_page_t m_tmp;
-
-	for (m_tmp = m; m_tmp < &m[1 << order]; m_tmp++)
-		m_tmp->pool = pool;
-}
-
 /*
  * Search for the given physical page "m" in the free lists.  If the search
  * succeeds, remove "m" from the free lists and return TRUE.  Otherwise, return
diff --git a/sys/vm/vm_phys.h b/sys/vm/vm_phys.h
index d10eb96f938f..86785fd7579d 100644
--- a/sys/vm/vm_phys.h
+++ b/sys/vm/vm_phys.h
@@ -79,7 +79,6 @@ void vm_phys_register_domains(int ndomains, struct mem_affinity *affinity,
     int *locality);
 vm_page_t vm_phys_scan_contig(int domain, u_long npages, vm_paddr_t low,
     vm_paddr_t high, u_long alignment, vm_paddr_t boundary, int options);
-void vm_phys_set_pool(int pool, vm_page_t m, int order);
 boolean_t vm_phys_unfree_page(vm_page_t m);
 int vm_phys_mem_affinity(int f, int t);
 void vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end);