Page MenuHomeFreeBSD

sound: Remove macro magic from pcm/feeder_matrix.c
Needs ReviewPublic

Authored by christos on Wed, Dec 11, 4:49 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 26, 2:26 PM
Unknown Object (File)
Thu, Dec 26, 10:15 AM
Unknown Object (File)
Thu, Dec 26, 8:03 AM
Unknown Object (File)
Thu, Dec 26, 6:14 AM
Unknown Object (File)
Mon, Dec 23, 6:56 AM
Unknown Object (File)
Sun, Dec 22, 4:55 AM
Unknown Object (File)
Wed, Dec 18, 5:34 PM
Unknown Object (File)
Fri, Dec 13, 12:32 PM
Subscribers

Details

Summary

Turn the FEEDMATRIX_DECLARE macro into a single inline function
(feed_matrix_apply()). There is no reason to have this as a macro, it
only complicated the code. An advantage of this patch is that, because
we no longer call the functions created by the macro through function
pointers (apply field of feed_matrix_info), we can call
feed_matrix_apply() directly in feed_matrix_feed().

Sponsored by: The FreeBSD Foundation
MFC after: 1 week

Diff Detail

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

Event Timeline

Same as D48032, you may want to call your function with literal format parameters, for performance reasons.

sys/dev/sound/pcm/feeder_matrix.c
448

Why can't this entire switch statement just be feed_matrix_apply(info, src, dst, j, info->fmt);?

sys/dev/sound/pcm/feeder_matrix.c
448

There is related discussion in D48032

Mark fmt argument as const.