git: d1eaefde3bca - stable/14 - sound: Remove hw.snd.version and SND_DRV_VERSION

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Fri, 17 May 2024 19:31:03 UTC
The branch stable/14 has been updated by christos:

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

commit d1eaefde3bca383abd419fd30796bffde242d385
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2024-05-06 18:30:58 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2024-05-17 19:30:35 +0000

    sound: Remove hw.snd.version and SND_DRV_VERSION
    
    hw.snd.version and SND_DRV_VERSION define the sound driver version and
    are meant to be used in bug reports, but because these values are
    constant, there is not much useful information we can extract from them.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    dev_submerge.ch, emaste
    Differential Revision:  https://reviews.freebsd.org/D44996
    
    (cherry picked from commit 7398d1ece5cfa2e6ce4997234a95115b49c9e818)
---
 sys/dev/sound/pcm/sndstat.c |  8 ++------
 sys/dev/sound/pcm/sound.c   | 10 ----------
 sys/dev/sound/version.h     | 42 ------------------------------------------
 3 files changed, 2 insertions(+), 58 deletions(-)

diff --git a/sys/dev/sound/pcm/sndstat.c b/sys/dev/sound/pcm/sndstat.c
index ef006a580d40..edb33e92ade9 100644
--- a/sys/dev/sound/pcm/sndstat.c
+++ b/sys/dev/sound/pcm/sndstat.c
@@ -51,7 +51,6 @@
 
 #include <dev/sound/pcm/sound.h>
 #include <dev/sound/pcm/pcm.h>
-#include <dev/sound/version.h>
 
 #include "feeder_if.h"
 
@@ -1271,11 +1270,8 @@ sndstat_prepare(struct sndstat_file *pf_self)
 	/* make sure buffer is reset */
 	sbuf_clear(s);
 
-	if (snd_verbose > 0) {
-		sbuf_printf(s, "FreeBSD Audio Driver (%ubit %d/%s)\n",
-		    (u_int)sizeof(intpcm32_t) << 3, SND_DRV_VERSION,
-		    MACHINE_ARCH);
-	}
+	if (snd_verbose > 0)
+		sbuf_printf(s, "FreeBSD Audio Driver\n");
 
 	/* generate list of installed devices */
 	k = 0;
diff --git a/sys/dev/sound/pcm/sound.c b/sys/dev/sound/pcm/sound.c
index 9b4de948eac4..d2acfc403e8c 100644
--- a/sys/dev/sound/pcm/sound.c
+++ b/sys/dev/sound/pcm/sound.c
@@ -41,7 +41,6 @@
 #include <dev/sound/pcm/ac97.h>
 #include <dev/sound/pcm/vchan.h>
 #include <dev/sound/pcm/dsp.h>
-#include <dev/sound/version.h>
 #include <sys/limits.h>
 #include <sys/sysctl.h>
 
@@ -64,15 +63,6 @@ SYSCTL_NODE(_hw, OID_AUTO, snd, CTLFLAG_RD | CTLFLAG_MPSAFE, 0,
 
 static void pcm_sysinit(device_t);
 
-/*
- * XXX I've had enough with people not telling proper version/arch
- *     while reporting problems, not after 387397913213th questions/requests.
- */
-static char snd_driver_version[] =
-    __XSTRING(SND_DRV_VERSION)"/"MACHINE_ARCH;
-SYSCTL_STRING(_hw_snd, OID_AUTO, version, CTLFLAG_RD, &snd_driver_version,
-    0, "driver version/arch");
-
 /**
  * @brief Unit number allocator for syncgroup IDs
  */
diff --git a/sys/dev/sound/version.h b/sys/dev/sound/version.h
deleted file mode 100644
index b816bbf964e8..000000000000
--- a/sys/dev/sound/version.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*-
- * SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (c) 2007 Ariff Abdullah <ariff@FreeBSD.org>
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#ifndef _SND_VERSION_H_
-#define _SND_VERSION_H_
-
-/* 
- * FreeBSD sound driver internal versioning, nothing to do
- * with OSS whatsoever. Dear future maintainer, please revisit
- * this _before_ Jan 1 2148
- *
- * Last 2 decimal places reserved for daily versioning, starting
- * with 0.
- */
-#define SND_DRV_VERSION		2009061500
-
-#endif /* !_SND_VERSION_H_ */