[PATCH net-next v2 7/7] net: ipa: avoid field overflow

2021-02-05 Thread Alex Elder
It's possible that the length passed to ipa_header_size_encoded() is larger than what can be represented by the HDR_LEN field alone (starting with IPA v4.5). If we attempted that, u32_encode_bits() would trigger a build-time error. Avoid this problem by masking off high-order bits of the value en

[PATCH net-next v2 7/7] net: ipa: avoid field overflow

2021-02-05 Thread Alex Elder
It's possible that the length passed to ipa_header_size_encoded() is larger than what can be represented by the HDR_LEN field alone (starting with IPA v4.5). If we attempted that, u32_encode_bits() would trigger a build-time error. Avoid this problem by masking off high-order bits of the value en