git: 72acd1720af3 - main - sound: Use sx_assert instead of KASSERT(sx_xlocked())

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Sat, 27 Jun 2026 14:27:01 UTC
The branch main has been updated by christos:

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

commit 72acd1720af365e6fd186cc1706994d72c43650a
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-06-27 14:25:27 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-06-27 14:26:53 +0000

    sound: Use sx_assert instead of KASSERT(sx_xlocked())
    
    It's redundant.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
---
 sys/dev/sound/sndstat.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sys/dev/sound/sndstat.c b/sys/dev/sound/sndstat.c
index 68902012563e..963be5ba0458 100644
--- a/sys/dev/sound/sndstat.c
+++ b/sys/dev/sound/sndstat.c
@@ -173,8 +173,7 @@ sndstat_remove_all_userdevs(struct sndstat_file *pf)
 {
 	struct sndstat_userdev *ud;
 
-	KASSERT(
-	    sx_xlocked(&pf->lock), ("%s: Called without pf->lock", __func__));
+	sx_assert(&pf->lock, SX_XLOCKED);
 	while ((ud = TAILQ_FIRST(&pf->userdev_list)) != NULL) {
 		TAILQ_REMOVE(&pf->userdev_list, ud, link);
 		free(ud->provider, M_DEVBUF);