From: Andrew Morton <akpm@linux-foundation.org>
To: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: fujita.tomonori@lab.ntt.co.jp, mingo@elte.hu,
just.for.lkml@googlemail.com, tomof@acm.org, jarkao2@gmail.com,
herbert@gondor.apana.org.au, linux-kernel@vger.kernel.org,
neilb@suse.de, bfields@fieldses.org, netdev@vger.kernel.org,
tom@opengridcomputing.com
Subject: Re: 2.6.24-rc6-mm1
Date: Tue, 8 Jan 2008 17:07:21 -0800 [thread overview]
Message-ID: <20080108170721.8f4c7412.akpm@linux-foundation.org> (raw)
In-Reply-To: <20080109095445N.fujita.tomonori@lab.ntt.co.jp>
On Wed, 09 Jan 2008 09:54:45 +0900
FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> wrote:
> > > --- a/lib/iommu-helper.c~a
> > > +++ a/lib/iommu-helper.c
> > > @@ -8,15 +8,20 @@
> > > static unsigned long find_next_zero_area(unsigned long *map,
> > > unsigned long size,
> > > unsigned long start,
> > > - unsigned int nr)
> > > + unsigned int nr,
> > > + unsigned long align_mask)
> > > {
> > > unsigned long index, end, i;
> > > again:
> > > index = find_next_zero_bit(map, size, start);
> > > +
> > > + /* Align allocation */
> > > + index = (index + align_mask) & ~align_mask;
> >
> > The ALIGN() macro is the approved way of doing this.
> >
> > (I don't think ALIGN adds much value really, especially given that you've
> > commented what's going on, but I guess it does make reviewing and reading a
> > little easier).
>
> Would be better to use __ALIGN_MASK? I can find only one user who
> directly use __ALIGN_MASK. The POWER IOMMU calculates align_mask by
> itself so it's easier to pass align_mask as an argument.
ALIGN() should be OK - its aditional type coercion isn't useful in this
case but ALIGN() is the official interface.
I don't see any reason why vermilion.c had to reach for __ALIGN_MASK. I'll
switch it to ALIGN().
next prev parent reply other threads:[~2008-01-09 1:08 UTC|newest]
Thread overview: 47+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20071222233056.d652743e.akpm@linux-foundation.org>
[not found] ` <64bb37e0712230827m7d368e2l3174f3b4396d09c1@mail.gmail.com>
[not found] ` <64bb37e0712281453y4aac82b7h7acc8ec314ca6e3e@mail.gmail.com>
2007-12-28 23:07 ` 2.6.24-rc6-mm1 Andrew Morton
2007-12-29 16:51 ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-30 1:30 ` 2.6.24-rc6-mm1 Herbert Xu
2007-12-30 3:34 ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-30 5:41 ` 2.6.24-rc6-mm1 Randy Dunlap
2007-12-31 20:15 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-01 12:04 ` 2.6.24-rc6-mm1 Herbert Xu
2008-01-01 12:59 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-01 18:29 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-02 18:29 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-02 21:51 ` 2.6.24-rc6-mm1 Herbert Xu
2008-01-02 21:57 ` 2.6.24-rc6-mm1 J. Bruce Fields
2008-01-03 5:02 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-03 15:37 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-03 18:52 ` 2.6.24-rc6-mm1 J. Bruce Fields
2008-01-04 10:23 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-04 13:30 ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-04 15:21 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-04 21:24 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05 0:07 ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-05 8:01 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05 10:13 ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-05 14:52 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-05 22:10 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 1:25 ` 2.6.24-rc6-mm1 Andrew Morton
2008-01-06 3:28 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-06 10:41 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 11:23 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-06 11:35 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 13:33 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-06 20:03 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-07 6:16 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-08 15:59 ` 2.6.24-rc6-mm1 Ingo Molnar
2008-01-08 23:57 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-09 0:27 ` 2.6.24-rc6-mm1 Andrew Morton
2008-01-09 0:54 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-09 1:07 ` Andrew Morton [this message]
2008-01-09 9:04 ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-10 0:54 ` 2.6.24-rc6-mm1 FUJITA Tomonori
2008-01-25 21:06 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 3:16 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 8:27 ` 2.6.24-rc6-mm1 Jarek Poplawski
2008-01-06 10:30 ` 2.6.24-rc6-mm1 Torsten Kaiser
2008-01-06 14:52 ` 2.6.24-rc6-mm1 Jarek Poplawski
2007-12-30 21:24 ` 2.6.24-rc6-mm1 J. Bruce Fields
2007-12-30 21:35 ` 2.6.24-rc6-mm1 Torsten Kaiser
2007-12-31 13:17 ` 2.6.24-rc6-mm1 Torsten Kaiser
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=20080108170721.8f4c7412.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=bfields@fieldses.org \
--cc=fujita.tomonori@lab.ntt.co.jp \
--cc=herbert@gondor.apana.org.au \
--cc=jarkao2@gmail.com \
--cc=just.for.lkml@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=tom@opengridcomputing.com \
--cc=tomof@acm.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;
as well as URLs for NNTP newsgroup(s).