Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 2026 09:54:56 +0000
From:      Christos Margiolis <christos@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: e93c021d2276 - stable/15 - snd_uaudio: Simplify chan->curr_cable calculation in uaudio_bulk_write_callback()
Message-ID:  <69cb99f0.3c08d.7f03521c@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/15 has been updated by christos:

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

commit e93c021d227625cd3bc2e2c5474302db2044094b
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:30:58 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-31 09:53:16 +0000

    snd_uaudio: Simplify chan->curr_cable calculation in uaudio_bulk_write_callback()
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D55918
    
    (cherry picked from commit 039477d3e7e72285174d83b973e58cea8de85280)
---
 sys/dev/sound/usb/uaudio.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sys/dev/sound/usb/uaudio.c b/sys/dev/sound/usb/uaudio.c
index 12e01599b200..b74cba611b24 100644
--- a/sys/dev/sound/usb/uaudio.c
+++ b/sys/dev/sound/usb/uaudio.c
@@ -5805,9 +5805,7 @@ tr_setup:
 				}
 			}
 
-			chan->curr_cable++;
-			if (chan->curr_cable >= chan->max_emb_jack)
-				chan->curr_cable = 0;
+			chan->curr_cable %= chan->max_emb_jack;
 
 			if (chan->curr_cable == start_cable) {
 				if (tr_any == 0)


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69cb99f0.3c08d.7f03521c>