lkml.org 
[lkml]   [2021]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH net-next] net: ipa: avoid 64-bit modulus
From
Date
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

\
 
 \ /
  Last update: 2021-03-24 18:33    [W:0.527 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site