net: ipa: introduce ipa_mem_find()
authorAlex Elder <elder@linaro.org>
Thu, 10 Jun 2021 19:23:07 +0000 (14:23 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 21:50:08 +0000 (14:50 -0700)
commit5e3bc1e5d0021c2efcbc8ba7da7b96c6a502d8bf
tree318480594466e478e5e245e8160906107ffa9751
parente9f5b2766e706f3020b3d975fee3b42d056b0849
net: ipa: introduce ipa_mem_find()

Introduce a new function that abstracts finding information about a
region in IPA-local memory, given its memory region ID.  For now it
simply uses the region ID as an index into the IPA memory array.
If the region is not defined, ipa_mem_find() returns a null pointer.

Update all code that accesses the ipa->mem[] array directly to use
ipa_mem_find() instead.  The return value must be checked for null
when optional memory regions are sought.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipa/ipa_cmd.c
drivers/net/ipa/ipa_mem.c
drivers/net/ipa/ipa_mem.h
drivers/net/ipa/ipa_qmi.c
drivers/net/ipa/ipa_table.c
drivers/net/ipa/ipa_uc.c