Page MenuHomeFreeBSD

sound: Simplify feeder_getclass()
ClosedPublic

Authored by christos on Nov 3 2025, 3:30 PM.
Tags
None
Referenced Files
F140094826: D53553.diff
Sat, Dec 20, 4:01 AM
Unknown Object (File)
Mon, Nov 24, 3:27 AM
Unknown Object (File)
Fri, Nov 21, 3:04 PM
Unknown Object (File)
Nov 18 2025, 7:11 AM
Unknown Object (File)
Nov 18 2025, 4:28 AM
Unknown Object (File)
Nov 6 2025, 4:44 PM
Unknown Object (File)
Nov 6 2025, 7:17 AM
Unknown Object (File)
Nov 6 2025, 7:00 AM
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.