Page MenuHomeFreeBSD

sound: Move root feeder initialization to separate function
AcceptedPublic

Authored by christos on Fri, Sep 27, 5:55 PM.
Tags
None
Referenced Files
F97722384: D46821.diff
Mon, Sep 30, 11:38 PM
Unknown Object (File)
Sun, Sep 29, 7:12 PM
Unknown Object (File)
Sun, Sep 29, 4:24 PM
Subscribers

Details

Summary

While here, fix some style errors.

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 59632
Build 56519: arc lint + arc unit

Event Timeline

zlei added a subscriber: zlei.
zlei added inline comments.
sys/dev/sound/pcm/feeder.c
64

The SYSINIT is the slow path. I've not tested yet but I bet M_WAITOK will be OK. So that we can guarantee that the root feeder is always available.

This revision is now accepted and ready to land.Sun, Sep 29, 3:15 AM
sys/dev/sound/pcm/feeder.c
64

I think we could change to M_WAITOK in feeder_register() as well.

christos added inline comments.
sys/dev/sound/pcm/feeder.c
64
sys/dev/sound/pcm/feeder.c
63

A nit here, you can assert, aka MPASS(feedercnt == 0), to ensure in future the change of order of SYSINIT will not break. The current change is absolutely OK, but just in case.

christos added inline comments.
sys/dev/sound/pcm/feeder.c
63

Good idea. Will commit the patch with the MPASS as well, but will the review here as-is here since it's accepted.

When making a non-functional change like this, it's nice to state why in the commit message.