]> git.baikalelectronics.ru Git - kernel.git/commit
net: qualcomm: rmnet: rearrange some NOTs
authorAlex Elder <elder@linaro.org>
Sat, 12 Jun 2021 14:37:30 +0000 (09:37 -0500)
committerDavid S. Miller <davem@davemloft.net>
Sat, 12 Jun 2021 20:18:48 +0000 (13:18 -0700)
commitc654e491399b8d849b75da4c47aa0a5ec0e0a787
treec4a5a425c79d16c0e713d0df14440ebcd60fb01c
parente67f5ed863e151b9eb1ae29f06322f3f82237c58
net: qualcomm: rmnet: rearrange some NOTs

With the ones' complement arithmetic, the sum of two negated values
is equal to the negation of the sum of the two original values [1].
Rearrange the calculation ip6_payload_sum using this property.

[1] https://tools.ietf.org/html/rfc1071

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/rmnet/rmnet_map_data.c