Page MenuHomeFreeBSD

sound: Retire volch
ClosedPublic

Authored by christos on Apr 25 2025, 5:26 PM.
Tags
None
Referenced Files
F173949923: D50022.id154472.diff
Tue, Sep 29, 2:22 PM
F173937435: D50022.diff
Tue, Sep 29, 12:17 PM
Unknown Object (File)
Sat, Sep 26, 3:51 AM
Unknown Object (File)
Mon, Sep 21, 10:32 PM
Unknown Object (File)
Aug 28 2026, 1:30 PM
Unknown Object (File)
Aug 28 2026, 12:50 PM
Unknown Object (File)
Aug 28 2026, 12:07 AM
Unknown Object (File)
Aug 27 2026, 3:11 AM
Subscribers

Details

Summary

volch is a variable used internally in dsp_ioctl_channel() which
corresponds to either priv->rdch or priv->wrch. As a result, priv->volch
is also a pointer to one of those two channels, but is also not used
anywhere outside dsp_ioctl_channel(). Since the operation of figuring
out which channel we want to operate on inside dsp_ioctl_channel() is
cheap enough, retire volch to avoid unnecessary complexity and
confusion.

While here, rename "volch" to just "ch".

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

sys/dev/sound/pcm/dsp.c
577–578

Delete this comment too? It's not adding anything anymore.

699

Can't you just pass NULL here?

christos marked 2 inline comments as done.

Address Mark's comments.

This revision is now accepted and ready to land.Apr 27 2025, 1:47 PM
This revision was automatically updated to reflect the committed changes.