Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Mar 2026 10:38:50 +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: 039477d3e7e7 - main - snd_uaudio: Simplify chan->curr_cable calculation in uaudio_bulk_write_callback()
Message-ID:  <69c269ba.33724.724d23ea@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=039477d3e7e72285174d83b973e58cea8de85280

commit 039477d3e7e72285174d83b973e58cea8de85280
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2026-03-24 10:30:58 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2026-03-24 10:38:39 +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
---
 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?69c269ba.33724.724d23ea>