git: 3bcd7d4fa46a - main - gone_in(9): bring the manual page up to date

From: Gleb Smirnoff <glebius_at_FreeBSD.org>
Date: Mon, 27 Oct 2025 18:51:32 UTC
The branch main has been updated by glebius:

URL: https://cgit.FreeBSD.org/src/commit/?id=3bcd7d4fa46a29ec3576d9474e9541510885cfaf

commit 3bcd7d4fa46a29ec3576d9474e9541510885cfaf
Author:     Gleb Smirnoff <glebius@FreeBSD.org>
AuthorDate: 2025-10-27 18:51:04 +0000
Commit:     Gleb Smirnoff <glebius@FreeBSD.org>
CommitDate: 2025-10-27 18:51:04 +0000

    gone_in(9): bring the manual page up to date
    
    Fixes:  01addd846c64fc2c8be610d83bfdc84ddb57f2ec
---
 share/man/man9/gone_in.9 | 42 +++++++++++++++++++++---------------------
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/share/man/man9/gone_in.9 b/share/man/man9/gone_in.9
index ebdc1ab19bfa..1b60e1eb10c2 100644
--- a/share/man/man9/gone_in.9
+++ b/share/man/man9/gone_in.9
@@ -23,7 +23,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd August 16, 2021
+.Dd June 24, 2025
 .Dt GONE_IN 9
 .Os
 .Sh NAME
@@ -33,14 +33,15 @@
 .Sh SYNOPSIS
 .In sys/systm.h
 .Ft void
-.Fn gone_in "int major" "const char *msg"
+.Fn gone_in "int major" "const char *msg" "..."
 .Ft void
-.Fn gone_in_dev "device_t dev" "int major" "const char *msg"
+.Fn gone_in_dev "device_t dev" "int major" "const char *msg" "..."
 .Sh DESCRIPTION
 The
-.Fn gone_in
-functions are used to provide a notice that the kernel is using a driver or
-some other functionality that is deprecated, and will be removed in a future
+.Nm gone_in
+functions are used to provide a notice that the kernel is actively using a
+driver or some other functionality that is deprecated, and is planned for
+removal in a future
 .Fx
 release.
 The notice is sent to the kernel
@@ -51,30 +52,29 @@ The
 argument specifies the major version of the
 .Fx
 release that will remove the deprecated functionality.
+The notice shall be printed only once, thus
+.Nm
+functions are safe to use in often executed code paths.
+.Pp
+.Nm gone_in_dev
+will prepend driver name before the notice.
 .Pp
 In releases before
 .Fa major
-the deprecation notice states
-.Do
-Deprecated code (to be removed in FreeBSD
-.Fa major Ns ):
-.Fa msg
-.Dc .
-In releases equal to and after
-.Fa major
-the notice states
+the provided notice will be appended with
 .Do
-Obsolete code will be removed soon:
-.Fa msg
+To be removed in FreeBSD
+.Fa major Ns
 .Dc .
 .Sh EXAMPLES
 .Bd -literal -offset indent
 void
-sample_init(void)
+example_api(foo_t *args)
 {
-	/* Initialization code omitted. */
+	gone_in(16, "Warning! %s[%u] uses obsolete API. ",
+	    curthread->td_proc->p_comm, curthread->td_proc->p_pid);
 
-	gone_in(14, "Giant-locked filesystem");
+	/* API implementation omitted. */
 }
 
 int
@@ -82,7 +82,7 @@ example_driver_attach(struct example_driver_softc *sc)
 {
 	/* Attach code omitted. */
 
-        gone_in_dev(sc->dev, 14, "Giant-locked driver");
+        gone_in_dev(sc->dev, 16, "driver is deprecated");
 }
 .Ed
 .Sh HISTORY