[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <47c870aa-44e5-b88e-61ad-5f3b75350273@linaro.org>
Date: Wed, 24 Mar 2021 12:32:25 -0500
From: Alex Elder <elder@...aro.org>
To: David Laight <David.Laight@...LAB.COM>,
'Alex Elder' <elder@...e.org>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>
Cc: "rdunlap@...radead.org" <rdunlap@...radead.org>,
"bjorn.andersson@...aro.org" <bjorn.andersson@...aro.org>,
"evgreen@...omium.org" <evgreen@...omium.org>,
"cpratapa@...eaurora.org" <cpratapa@...eaurora.org>,
"subashab@...eaurora.org" <subashab@...eaurora.org>,
"elder@...nel.org" <elder@...nel.org>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next] net: ipa: avoid 64-bit modulus
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
Powered by blists - more mailing lists