From fb9b76e05247e014f5faa554161028f6aa409bfd Mon Sep 17 00:00:00 2001 From: Zhenlei Huang Date: Wed, 22 Feb 2023 00:22:23 +0800 Subject: [PATCH] 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 --- 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 4f242b07f169..b064e8e864ff 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 @@ -571,7 +577,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; @@ -589,7 +595,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 d0ede39c0cb1..a02b86077043 100644 --- a/sys/net/vnet.h +++ b/sys/net/vnet.h @@ -360,12 +360,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. */