net: ipa: separate region range check from other validation
authorAlex Elder <elder@linaro.org>
Wed, 9 Jun 2021 22:34:57 +0000 (17:34 -0500)
committerDavid S. Miller <davem@davemloft.net>
Wed, 9 Jun 2021 22:59:33 +0000 (15:59 -0700)
commit5e57c6c5a349ed8026e63c9ef70e4655fe171b09
treeb39addec02f66bc2cb1130319932eab1f4b1b972
parent98334d2a3ba4c79947650710ac06434e25824a35
net: ipa: separate region range check from other validation

The only thing done by ipa_mem_valid_one() that requires hardware
access is the check for whether all regions fit within the size of
IPA local memory specified by an IPA register.

Introduce ipa_mem_size_valid() to implement this verification and
stop doing so in ipa_mem_valid_one().  Call the new function from
ipa_mem_config() (which is also the caller of ipa_mem_valid()).

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