]> git.baikalelectronics.ru Git - kernel.git/commit
net: ipa: clean up header memory validation
authorAlex Elder <elder@linaro.org>
Thu, 10 Jun 2021 19:23:02 +0000 (14:23 -0500)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Jun 2021 21:50:08 +0000 (14:50 -0700)
commit5028d414ea0ab9fce0e758115baca7de472064d1
tree7f13803bd0f6ce300d334532140b0b20e05c7946
parentf4114ca55252700f45029e10ba57ffeb4afa42a4
net: ipa: clean up header memory validation

Do some general cleanup in ipa_cmd_header_valid():
  - Delay assigning the mem variable until just before it's used.
  - Assign the maximum offset and size values together.
  - Improve comments explaining the single range of memory being
    made up of a modem portion and an AP portion.
  - Record the offset of the combined range in a local variable.
  - Do the initial size assignment right after assigning the offset.

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