Page MenuHomeFreeBSD

sound: Simplify feeder_getclass()
ClosedPublic

Authored by christos on Nov 3 2025, 3:30 PM.
Tags
None
Referenced Files
F161085177: D53553.id166216.diff
Tue, Jun 30, 10:38 AM
Unknown Object (File)
Mon, Jun 29, 2:44 AM
Unknown Object (File)
Sun, Jun 28, 7:11 AM
Unknown Object (File)
Fri, Jun 19, 11:17 PM
Unknown Object (File)
Wed, Jun 10, 10:23 AM
Unknown Object (File)
Sun, Jun 7, 9:46 AM
Unknown Object (File)
May 19 2026, 1:51 PM
Unknown Object (File)
Apr 29 2026, 6:26 PM
Subscribers

Details

Summary

With the parameters we provide feeder_getclass(), the only thing we
really care about is the feeder's class type. We can simplify (and make
the code more readable) that by simply passing the type to
feeder_getclass(). Apart from being simpler, we can now also retire
feedertab_entry->desc and cmpdesc().

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/feeder.c
59

Why is it "first" if there's only one?

sys/dev/sound/pcm/feeder.c
59

This function is called by the following sysinit:

SYSINIT(feeder_root, SI_SUB_DRIVERS, SI_ORDER_FIRST, feeder_register_root,
    &feeder_root_class);

This one is called before the other feeder sysinits. The check here is just to make sure that we enter this function for FEEDER_ROOT only.

This revision is now accepted and ready to land.Nov 4 2025, 12:49 PM
This revision was automatically updated to reflect the committed changes.