From: David S. Miller Date: Thu, 10 Jun 2021 21:50:08 +0000 (-0700) Subject: Merge branch 'ipa-mem-2' X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=76cf404c40ae8efcf8c6405535a3f6f69e6ba2a5;p=linux.git 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 --- 76cf404c40ae8efcf8c6405535a3f6f69e6ba2a5