diff options
author | Alex Elder <elder@linaro.org> | 2021-06-10 22:23:08 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-06-11 00:50:08 +0300 |
commit | c61cfb941dcd8c0529a0c0be31bb1722feaa6082 (patch) | |
tree | a2c1ba1603548024f248273b416e001b3975d3c8 /drivers/net/ipa/ipa_mem.h | |
parent | 5e3bc1e5d0021c2efcbc8ba7da7b96c6a502d8bf (diff) | |
download | linux-c61cfb941dcd8c0529a0c0be31bb1722feaa6082.tar.xz |
net: ipa: don't index mem data array by ID
Finally the code handles the IPA memory region array in the
configuration data without assuming it is indexed by region ID.
Get rid of the array index designators where these arrays are
initialized. As a result, there's no more need to define an
explicitly undefined memory region ID, so get rid of that.
Change ipa_mem_find() so it no longer assumes the ipa->mem[] array
is indexed by memory region ID. Instead, have it search the array
for the entry having the requested memory ID, and return the address
of the descriptor if found. Otherwise return NULL.
Stop allowing memory regions to be defined with zero size and zero
canary value. Check for this condition in ipa_mem_valid_one().
As a result, it is not necessary to check for this case in
ipa_mem_config().
Finally, there is no need for IPA_MEM_UNDEFINED to be defined any
more, so get rid of it.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ipa/ipa_mem.h')
-rw-r--r-- | drivers/net/ipa/ipa_mem.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/net/ipa/ipa_mem.h b/drivers/net/ipa/ipa_mem.h index 712b2881be0c..570bfdd99bff 100644 --- a/drivers/net/ipa/ipa_mem.h +++ b/drivers/net/ipa/ipa_mem.h @@ -43,7 +43,6 @@ struct ipa_mem_data; /* IPA-resident memory region ids */ enum ipa_mem_id { - IPA_MEM_UNDEFINED = 0, /* undefined region */ IPA_MEM_UC_SHARED, /* 0 canaries */ IPA_MEM_UC_INFO, /* 0 canaries */ IPA_MEM_V4_FILTER_HASHED, /* 2 canaries */ |