Page MenuHomeFreeBSD

sound: Remove useless newspd check in sysctl_dev_pcm_vchanrate()
ClosedPublic

Authored by christos on Sep 28 2024, 3:16 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Oct 3, 12:35 AM
Unknown Object (File)
Thu, Oct 1, 5:02 PM
Unknown Object (File)
Fri, Sep 11, 6:08 PM
Unknown Object (File)
Thu, Sep 10, 8:48 AM
Unknown Object (File)
Thu, Sep 10, 6:48 AM
Unknown Object (File)
Wed, Sep 9, 6:46 PM
Unknown Object (File)
Sun, Sep 6, 6:56 PM
Unknown Object (File)
Sat, Sep 5, 7:44 PM
Subscribers

Details

Summary

feeder_rate_min functions as the lower boundary.

Sponsored by: The FreeBSD Foundation
MFC after: 2 days

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 59644
Build 56531: arc lint + arc unit

Event Timeline

sys/dev/sound/pcm/vchan.c
511

We could just as well use RANGE() to fit the speed into the acceptable range, instead of returning an error.

dev_submerge.ch added inline comments.
sys/dev/sound/pcm/vchan.c
511

I'd prefer the EINVAL return here. The values close to feeder_rate_min and feeder_rate_max are unrealistic and never used in practice, going out of bounds here is almost certainly a user error.

This revision is now accepted and ready to land.Sep 29 2024, 3:08 PM