diff options
author | Alex Elder <elder@linaro.org> | 2021-06-10 14:23:01 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-10 14:50:08 -0700 |
commit | 8cc7ebbf5f6e8ca825dba4d0180329857c997c40 (patch) | |
tree | a7f5d0bc43cae81ff1180d385bab3c5eb348d70c /LICENSES | |
parent | 53f8b1b25419a14b784feb6706bfe5bac03c5a75 (diff) |
net: ipa: don't assume mem array indexed by ID
Change ipa_mem_valid() to iterate over the entries using a u32 index
variable rather than using a memory region ID. Use the ID found
inside the memory descriptor rather than the loop index.
Change ipa_mem_size_valid() to iterate over the entries but without
assuming the array index is the memory region ID. "Empty" entries
will have zero size; and we'll temporarily assume such entries have
zero offset as well (they all do, currently).
Similarly, don't assume the mem[] array is indexed by ID in
ipa_mem_config(). There, "empty" entries will have a zero canary
count, so no special assumptions are needed to handle them correctly.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'LICENSES')
0 files changed, 0 insertions, 0 deletions