Page MenuHomeFreeBSD

sound: Simplify chn_init()
ClosedPublic

Authored by christos on Jul 17 2024, 12:42 AM.
Tags
None
Referenced Files
F166884033: D45985.id141017.diff
Mon, Aug 17, 12:35 PM
Unknown Object (File)
Sat, Aug 15, 6:23 AM
Unknown Object (File)
Wed, Aug 12, 11:59 PM
Unknown Object (File)
Tue, Aug 11, 7:16 PM
Unknown Object (File)
Tue, Aug 11, 7:14 PM
Unknown Object (File)
Tue, Aug 11, 4:39 PM
Unknown Object (File)
Mon, Aug 10, 12:28 PM
Unknown Object (File)
Sun, Aug 9, 1:51 PM
Subscribers

Details

Summary
  • Remove unnecessary CHN_[UN]LOCKs.
  • Improve device_printf() messages.
  • Remove redundant checks.
  • Remove 0 assignments, since the channel is allocated with M_ZERO.
  • Re-organize sections in a more coherent way.
  • Remove "out1" label, just return NULL directly.
  • Rename "out2" to "fail" and simplify logic.
  • Do not check the return value of dsp_unit2name(), as it is guaranteed not to fail (we pass a valid channel type).

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

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

Event Timeline

This is hard to review. I can't see any problems, but there are lots of things mixed in so it's hard to be confident. If you are happy with the change, I think you should just go ahead.

Don't see anything suspicious, no regressions in my (brief) tests.

This revision is now accepted and ready to land.Jul 22 2024, 12:40 AM
This revision was automatically updated to reflect the committed changes.