]> git.baikalelectronics.ru Git - kernel.git/commit
Merge branch 'ipa-mem-2'
authorDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 21:50:08 +0000 (14:50 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 21:50:08 +0000 (14:50 -0700)
commitde13fd295643d905296d8b58b70da30c0e4d996e
treea2c1ba1603548024f248273b416e001b3975d3c8
parentbe215a73b3371e7f80a7b8f88787b218d5b57c1e
parentbcd7a346eb3489568031990dff7ac1602c8aa8a3
Merge branch 'ipa-mem-2'

Alex Elder says:

====================
net: ipa: memory region rework, part 2

This is the second portion of a set of patches updating the IPA
memory region code.

In this portion (part 2), the focus is on adjusting the code so that
it no longer assumes the memory region descriptor array is indexed
by the region identifier.  This brings with it some related cleanup.

Three loops are changed so their loop index variable is an unsigned
rather than an enumerated type.

A set of functions is changed so a region identifier (rather than a
memory region descriptor pointer) is passed as argument, to simplify
their call sites.  This isn't entirely related or required, but I
think it improves the code.

A validation function for filter and route table memory regions is
changed to take memory region IDs, rather than determining which
region to validate based on a set of Boolean flags.

Finally, ipa_mem_find() is created to abstract getting a memory
descriptor based on its ID, and it is used everywhere rather than
indexing the array.  With that implemented, all of the memory
regions can be defined by arrays of entries defined without
providing index designators.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>