[PATCH 10/50] staging: most: core: remove function get_channel_by_iface

Frans Klaver fransklaver at gmail.com
Wed Nov 22 10:44:25 UTC 2017


On Tue, Nov 21, 2017 at 3:04 PM, Christian Gromm
<christian.gromm at microchip.com> wrote:
> This patch removes the function get_channel_by_iface that walks a list of
> all registered interfaces and returns a pointer to a channel when matched.
> Instead the private field of the interface structure is used to directly
> access the channel via the id. The patch is needed to remove unnecessary
> list traversing.

get_channel_by_iface causes a lot of list traversions when trying to
match the channel. If we store our most instance in the interfaces
private pointer, we can access the channel directly. The search is now
no longer necessary and get_channel_by_iface can be removed.

Same story, none of the, I feel, awkward "This patch does blabla" style text.


More information about the devel mailing list