From: Julia Lawall <julia.lawall@lip6.fr>
To: David Laight <David.Laight@ACULAB.COM>
Cc: 'Julia Lawall' <julia.lawall@lip6.fr>,
Geert Uytterhoeven <geert@linux-m68k.org>,
linux-rdma <linux-rdma@vger.kernel.org>,
"kernel-janitors@vger.kernel.org"
<kernel-janitors@vger.kernel.org>,
Linux Fbdev development list <linux-fbdev@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ath10k@lists.infradead.org" <ath10k@lists.infradead.org>,
linux-wireless <linux-wireless@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
driverdevel <devel@driverdev.osuosl.org>,
"iss_storagedev@hp.com" <iss_storagedev@hp.com>,
scsi <linux-scsi@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
"adi-buildroot-devel@lists.sourceforge.net"
<adi-buildroot-devel@lists.sourceforge.net>
Subject: RE: [PATCH 0/10] use safer test on the result of find_first_zero_bit
Date: Wed, 4 Jun 2014 11:52:32 +0200 (CEST) [thread overview]
Message-ID: <alpine.DEB.2.10.1406041148590.2441@hadrien> (raw)
In-Reply-To: <063D6719AE5E284EB5DD2968C1650D6D1725705F@AcuExch.aculab.com>
On Wed, 4 Jun 2014, David Laight wrote:
> From: Julia Lawall
> > On Wed, 4 Jun 2014, Geert Uytterhoeven wrote:
> >
> > > Hi Julia,
> > >
> > > On Wed, Jun 4, 2014 at 11:07 AM, Julia Lawall <Julia.Lawall@lip6.fr> wrote:
> > > > Find_first_zero_bit considers BITS_PER_LONG bits at a time, and thus may
> > > > return a larger number than the maximum position argument if that position
> > > > is not a multiple of BITS_PER_LONG.
> > >
> > > Shouldn't this be fixed in find_first_zero_bit() instead?
> >
> > OK, I could do that as well. Most of the callers currently test with >=.
> > Should they be left as is, or changed to use ==?
>
> Do we want to add an extra test to find_first_zero_bit() and effectively
> slow down all the calls - especially those where the length is a
> multiple of 8 (probably the most common).
Currently, most of the calls test with >=, and most of the others seem to
need to (either the size value did not look like a multiple of anything in
particular, or it was eg read from a device).
Note that it is BITS_PER_LONG, so it seems like it is typically 32 or 64,
not 8.
> Maybe the documented return code should be changed to allow for the
> existing behaviour.
Sorry, I'm not sure to understand what you suggest here.
thanks,
julia
next prev parent reply other threads:[~2014-06-04 9:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-04 9:07 [PATCH 0/10] use safer test on the result of find_first_zero_bit Julia Lawall
2014-06-04 9:07 ` [PATCH 2/10] ath10k: " Julia Lawall
2014-06-04 9:35 ` [PATCH 0/10] " Geert Uytterhoeven
[not found] ` <CAMuHMdXsoFUXj4jLMWN6NY7Um19KwWO9Rhx=9=gqWu_K5Ev2kQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-06-04 9:38 ` Julia Lawall
2014-06-04 9:46 ` David Laight
2014-06-04 9:52 ` Julia Lawall [this message]
2014-06-04 10:55 ` Geert Uytterhoeven
2014-06-04 11:00 ` Julia Lawall
2014-06-04 11:07 ` Geert Uytterhoeven
2014-06-04 13:12 ` Julia Lawall
2014-06-04 13:34 ` David Laight
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=alpine.DEB.2.10.1406041148590.2441@hadrien \
--to=julia.lawall@lip6.fr \
--cc=David.Laight@ACULAB.COM \
--cc=adi-buildroot-devel@lists.sourceforge.net \
--cc=ath10k@lists.infradead.org \
--cc=devel@driverdev.osuosl.org \
--cc=geert@linux-m68k.org \
--cc=iss_storagedev@hp.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=linux-wireless@vger.kernel.org \
--cc=netdev@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox