Messages in this thread | | | Subject | Re: [PATCH net-next] net: ipa: avoid 64-bit modulus | From | Alex Elder <> | Date | Wed, 24 Mar 2021 12:32:25 -0500 |
| |
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
| |