The branch main has been updated by christos:

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

commit 0794365d5d3cc93940b873553382288a2a2c88c4
Author:     Christos Margiolis <[email protected]>
AuthorDate: 2026-01-02 17:20:41 +0000
Commit:     Christos Margiolis <[email protected]>
CommitDate: 2026-01-02 17:20:41 +0000

    sound: Merge chn_intr() with chn_intr_locked()
    
    There is no scenario where chn_intr() is called with the channel lock
    already held.
    
    No functional change intended.
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Reviewed by:    kib, markj
    Differential Revision:  https://reviews.freebsd.org/D53854
---
 sys/dev/sound/pcm/channel.c | 20 ++------------------
 sys/dev/sound/pcm/channel.h |  1 -
 2 files changed, 2 insertions(+), 19 deletions(-)

diff --git a/sys/dev/sound/pcm/channel.c b/sys/dev/sound/pcm/channel.c
index 7c3f0e3dc9f0..011dc1427c2e 100644
--- a/sys/dev/sound/pcm/channel.c
+++ b/sys/dev/sound/pcm/channel.c
@@ -581,30 +581,14 @@ chn_read(struct pcm_channel *c, struct uio *buf)
 }
 
 void
-chn_intr_locked(struct pcm_channel *c)
+chn_intr(struct pcm_channel *c)
 {
-
-       CHN_LOCKASSERT(c);
-
+       CHN_LOCK(c);
        c->interrupts++;
-
        if (c->direction == PCMDIR_PLAY)
                chn_wrintr(c);
        else
                chn_rdintr(c);
-}
-
-void
-chn_intr(struct pcm_channel *c)
-{
-
-       if (CHN_LOCKOWNED(c)) {
-               chn_intr_locked(c);
-               return;
-       }
-
-       CHN_LOCK(c);
-       chn_intr_locked(c);
        CHN_UNLOCK(c);
 }
 
diff --git a/sys/dev/sound/pcm/channel.h b/sys/dev/sound/pcm/channel.h
index 0b17c4a130a7..6415f5c88984 100644
--- a/sys/dev/sound/pcm/channel.h
+++ b/sys/dev/sound/pcm/channel.h
@@ -298,7 +298,6 @@ int chn_oss_setorder(struct pcm_channel *, unsigned long 
long *);
 int chn_oss_getmask(struct pcm_channel *, uint32_t *);
 
 void chn_resetbuf(struct pcm_channel *c);
-void chn_intr_locked(struct pcm_channel *c);
 void chn_intr(struct pcm_channel *c);
 int chn_abort(struct pcm_channel *c);
 

Reply via email to