All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: David Laight <David.Laight@ACULAB.COM>,
	'Alex Elder' <elder@ieee.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"kuba@kernel.org" <kuba@kernel.org>
Cc: "rdunlap@infradead.org" <rdunlap@infradead.org>,
	"bjorn.andersson@linaro.org" <bjorn.andersson@linaro.org>,
	"evgreen@chromium.org" <evgreen@chromium.org>,
	"cpratapa@codeaurora.org" <cpratapa@codeaurora.org>,
	"subashab@codeaurora.org" <subashab@codeaurora.org>,
	"elder@kernel.org" <elder@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] net: ipa: avoid 64-bit modulus
Date: Wed, 24 Mar 2021 12:32:25 -0500	[thread overview]
Message-ID: <47c870aa-44e5-b88e-61ad-5f3b75350273@linaro.org> (raw)
In-Reply-To: <aa5a91defcca4a4cb8e2317e26385010@AcuMS.aculab.com>

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

      reply	other threads:[~2021-03-24 17:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-23  1:05 [PATCH net-next] net: ipa: avoid 64-bit modulus Alex Elder
2021-03-23  2:44 ` Randy Dunlap
2021-03-24  0:20 ` patchwork-bot+netdevbpf
2021-03-24 16:27 ` David Laight
2021-03-24 17:07   ` Alex Elder
2021-03-24 17:12     ` David Laight
2021-03-24 17:32       ` Alex Elder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=47c870aa-44e5-b88e-61ad-5f3b75350273@linaro.org \
    --to=elder@linaro.org \
    --cc=David.Laight@ACULAB.COM \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=elder@ieee.org \
    --cc=elder@kernel.org \
    --cc=evgreen@chromium.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=subashab@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.