summaryrefslogtreecommitdiff
path: root/drivers/net/ipa/ipa_mem.c
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2021-06-09 17:34:53 -0500
committerDavid S. Miller <davem@davemloft.net>2021-06-09 15:59:33 -0700
commitf636a83662ffdc3e05526770e73628485f4a53de (patch)
tree9e35d2200f9ea48288cbc611429f1304fa1de26b /drivers/net/ipa/ipa_mem.c
parentab324d8dfddad04bec0e8421242716504e31e204 (diff)
downloadlwn-f636a83662ffdc3e05526770e73628485f4a53de.tar.gz
lwn-f636a83662ffdc3e05526770e73628485f4a53de.zip
net: ipa: define IPA_MEM_END_MARKER
Define a new pseudo memory region identifer that specifies the offset at the end of IPA resident memory. Use it instead of IPA_MEM_UC_EVENT_RING in places where the size of that region was defined to be 0. The size of the IPA_MEM_END_MARKER pseudo region must be zero. 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.c')
-rw-r--r--drivers/net/ipa/ipa_mem.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ipa/ipa_mem.c b/drivers/net/ipa/ipa_mem.c
index 1624125e7459..e3c43cf6e441 100644
--- a/drivers/net/ipa/ipa_mem.c
+++ b/drivers/net/ipa/ipa_mem.c
@@ -120,6 +120,8 @@ static bool ipa_mem_valid(struct ipa *ipa, enum ipa_mem_id mem_id)
else if (mem->offset + mem->size > ipa->mem_size)
dev_err(dev, "region %u ends beyond memory limit (0x%08x)\n",
mem_id, ipa->mem_size);
+ else if (mem_id == IPA_MEM_END_MARKER && mem->size)
+ dev_err(dev, "non-zero end marker region size\n");
else
return true;