git: 78c22dde834a - stable/12 - vnet: Make vnet_sys[un]init() static

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 28 Feb 2023 02:03:48 UTC
The branch stable/12 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=78c22dde834a99302e746262fd5440713cc55fcd

commit 78c22dde834a99302e746262fd5440713cc55fcd
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2023-02-21 16:22:23 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2023-02-28 02:02:17 +0000

    vnet: Make vnet_sys[un]init() static
    
    These two functions are intended to be used only when allocating or
    destroying vnet instances.
    
    No functional change intended.
    
    Reviewed by:    kp
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D37955
    
    (cherry picked from commit fb9b76e05247e014f5faa554161028f6aa409bfd)
    (cherry picked from commit 7b6d9cae9760152f0994d0825ee49cb5b5e204dc)
---
 sys/net/vnet.c | 10 ++++++++--
 sys/net/vnet.h |  6 ------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sys/net/vnet.c b/sys/net/vnet.c
index 3fd423d22d1d..0c8755990520 100644
--- a/sys/net/vnet.c
+++ b/sys/net/vnet.c
@@ -220,6 +220,12 @@ SDT_PROBE_DEFINE2(vnet, functions, vnet_destroy, entry,
 SDT_PROBE_DEFINE1(vnet, functions, vnet_destroy, return,
     "int");
 
+/*
+ * Run per-vnet sysinits or sysuninits during vnet creation/destruction.
+ */
+static void vnet_sysinit(void);
+static void vnet_sysuninit(void);
+
 #ifdef DDB
 static void db_show_vnet_print_vs(struct vnet_sysinit *, int);
 #endif
@@ -569,7 +575,7 @@ vnet_deregister_sysuninit(void *arg)
  * vnet construction.  The caller is responsible for ensuring the new vnet is
  * the current vnet and that the vnet_sysinit_sxlock lock is locked.
  */
-void
+static void
 vnet_sysinit(void)
 {
 	struct vnet_sysinit *vs;
@@ -587,7 +593,7 @@ vnet_sysinit(void)
  * vnet destruction.  The caller is responsible for ensuring the dying vnet
  * the current vnet and that the vnet_sysinit_sxlock lock is locked.
  */
-void
+static void
 vnet_sysuninit(void)
 {
 	struct vnet_sysinit *vs;
diff --git a/sys/net/vnet.h b/sys/net/vnet.h
index 2d69a8a96633..034c120f0dd0 100644
--- a/sys/net/vnet.h
+++ b/sys/net/vnet.h
@@ -352,12 +352,6 @@ struct vnet_sysinit {
 	SYSUNINIT(vnet_uninit_ ## ident, subsystem, order,		\
 	    vnet_deregister_sysuninit, &ident ## _vnet_uninit)
 
-/*
- * Run per-vnet sysinits or sysuninits during vnet creation/destruction.
- */
-void	 vnet_sysinit(void);
-void	 vnet_sysuninit(void);
-
 /*
  * Interfaces for managing per-vnet constructors and destructors.
  */