Re: [PATCH net-next] net: ipa: avoid 64-bit modulus

From: Alex Elder
Date: Wed Mar 24 2021 - 13:33:31 EST


On 3/24/21 12:12 PM, David Laight wrote:
I think 'count' is also required to be a power of 2.
so you could have checked 'addr & (size - 1)'.

It is required to be, and that is checked elsewhere
(in gsi_channel_data_valid()). And yes, size would
therefore be a power-of-2, and so your clever test
would be a simple test.

I'll take that into account when I implement the
fix. Thanks for the suggestion.

-Alex