Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2026 15:33:27 +0000
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e8ea97602ca9 - main - sound: Retire M_MIXER
Message-ID:  <6a170ec7.27fa0.5e664930@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by christos:

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

commit e8ea97602ca97166a0729fdc32c84c9016fe7b0c
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-04-15 23:39:23 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-05-27 15:32:11 +0000

    sound: Retire M_MIXER
    
    Even though harmless, it is not really useful, as there is essentially
    only one allocation with M_MIXER.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Pull Request:   https://ron-dev.freebsd.org/FreeBSD/src/pulls/18
---
 sys/dev/sound/pcm/mixer.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/sys/dev/sound/pcm/mixer.c b/sys/dev/sound/pcm/mixer.c
index 8015c8fc0c32..7ccb57c205ba 100644
--- a/sys/dev/sound/pcm/mixer.c
+++ b/sys/dev/sound/pcm/mixer.c
@@ -37,8 +37,6 @@
 #include "feeder_if.h"
 #include "mixer_if.h"
 
-static MALLOC_DEFINE(M_MIXER, "mixer", "mixer");
-
 static int mixer_bypass = 1;
 SYSCTL_INT(_hw_snd, OID_AUTO, vpc_mixer_bypass, CTLFLAG_RWTUN,
     &mixer_bypass, 0,
@@ -638,7 +636,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo,
 	KASSERT(type == MIXER_TYPE_PRIMARY || type == MIXER_TYPE_SECONDARY,
 	    ("invalid mixer type=%d", type));
 
-	m = (struct snd_mixer *)kobj_create(cls, M_MIXER, M_WAITOK | M_ZERO);
+	m = (struct snd_mixer *)kobj_create(cls, M_DEVBUF, M_WAITOK | M_ZERO);
 	snprintf(m->name, sizeof(m->name), "%s:mixer",
 	    device_get_nameunit(dev));
 	if (desc != NULL) {
@@ -659,7 +657,7 @@ mixer_obj_create(device_t dev, kobj_class_t cls, void *devinfo,
 	if (MIXER_INIT(m)) {
 		mtx_lock(&m->lock);
 		mtx_destroy(&m->lock);
-		kobj_delete((kobj_t)m, M_MIXER);
+		kobj_delete((kobj_t)m, M_DEVBUF);
 		return (NULL);
 	}
 
@@ -678,7 +676,7 @@ mixer_delete(struct snd_mixer *m)
 	MIXER_UNINIT(m);
 
 	mtx_destroy(&m->lock);
-	kobj_delete((kobj_t)m, M_MIXER);
+	kobj_delete((kobj_t)m, M_DEVBUF);
 
 	return (0);
 }
@@ -793,7 +791,7 @@ mixer_uninit(device_t dev)
 	MIXER_UNINIT(m);
 
 	mtx_destroy(&m->lock);
-	kobj_delete((kobj_t)m, M_MIXER);
+	kobj_delete((kobj_t)m, M_DEVBUF);
 
 	d->mixer_dev = NULL;
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a170ec7.27fa0.5e664930>