git: 127a39c54c2b - stable/14 - sound: Update comment and channel insertion in vchan_create()

From: Christos Margiolis <christos_at_FreeBSD.org>
Date: Tue, 04 Mar 2025 15:47:07 UTC
The branch stable/14 has been updated by christos:

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

commit 127a39c54c2bb56189bd44353d54e34c8ff220bd
Author:     Christos Margiolis <christos@FreeBSD.org>
AuthorDate: 2025-02-25 11:44:30 +0000
Commit:     Christos Margiolis <christos@FreeBSD.org>
CommitDate: 2025-03-04 15:46:06 +0000

    sound: Update comment and channel insertion in vchan_create()
    
    The comment and rationale behind choosing CHN_INSERT_SORT_DESCEND()
    instead of CHN_INSERT_SORT_ASCEND() are no longer relevant as of FILLME
    ("sound: Allocate vchans on-demand").
    
    Sponsored by:   The FreeBSD Foundation
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D48962
    
    (cherry picked from commit 2868776c9c6f5313a5676786f642b766f103d780)
---
 sys/dev/sound/pcm/vchan.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/sys/dev/sound/pcm/vchan.c b/sys/dev/sound/pcm/vchan.c
index 45f0a8b00bd2..27739fe68852 100644
--- a/sys/dev/sound/pcm/vchan.c
+++ b/sys/dev/sound/pcm/vchan.c
@@ -644,12 +644,7 @@ vchan_create(struct pcm_channel *parent, struct pcm_channel **child)
 	PCM_UNLOCK(d);
 
 	CHN_LOCK(parent);
-	/*
-	 * Add us to our parent channel's children in reverse order
-	 * so future destruction will pick the last (biggest number)
-	 * channel.
-	 */
-	CHN_INSERT_SORT_DESCEND(parent, ch, children);
+	CHN_INSERT_SORT_ASCEND(parent, ch, children);
 
 	*child = ch;