From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Tejun Heo <tj@kernel.org>
Cc: Subhash Jadavani <subhashj@codeaurora.org>,
linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org,
linux-mmc@vger.kernel.org, linux-arm-msm@vger.kernel.org,
martin.petersen@oracle.com, asias@redhat.com,
linux-arm-kernel@lists.infradead.org,
Russell King <linux@arm.linux.org.uk>
Subject: Re: [PATCH v2 1/1] block: blk-merge: don't merge the pages with non-contiguous descriptors
Date: Thu, 17 Jan 2013 09:11:20 +0000 [thread overview]
Message-ID: <1358413880.2394.7.camel@dabdike.int.hansenpartnership.com> (raw)
In-Reply-To: <20130116231857.GU2668@htj.dyndns.org>
On Wed, 2013-01-16 at 15:18 -0800, Tejun Heo wrote:
> On Wed, Jan 16, 2013 at 10:32:35AM +0000, James Bottomley wrote:
> > diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c
> > index 6b2fb87..ab88c5b 100644
> > --- a/arch/arm/mm/dma-mapping.c
> > +++ b/arch/arm/mm/dma-mapping.c
> > @@ -809,7 +809,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,
> > op(vaddr, len, dir);
> > }
> > offset = 0;
> > - page++;
> > + page = pfn_to_page(page_to_pfn(page) + 1);
>
> Probably page = nth_page(page, 1) is the better form.
It's the same thing.
I'd actually prefer page = pfn_to_page(page_to_pfn(page) + 1); because
it makes the code look like the hack it is. The preferred form for all
iterators like this should be to iterate over the pfn instead of a
pointer into the page arrays, because that will always work correctly no
matter how many weird and wonderful memory schemes we come up with.
James
next prev parent reply other threads:[~2013-01-17 9:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-15 16:01 Subhash Jadavani
2013-01-15 16:19 ` James Bottomley
2013-01-16 6:37 ` Subhash Jadavani
2013-01-16 9:25 ` James Bottomley
2013-01-16 10:32 ` James Bottomley
2013-01-16 12:39 ` Subhash Jadavani
2013-01-16 23:14 ` Russell King - ARM Linux
2013-01-17 8:54 ` James Bottomley
2013-01-16 23:18 ` Tejun Heo
2013-01-17 9:11 ` James Bottomley [this message]
2013-01-17 10:37 ` Russell King - ARM Linux
2013-01-17 10:47 ` Russell King - ARM Linux
2013-01-17 11:01 ` James Bottomley
2013-01-17 11:04 ` Russell King - ARM Linux
2013-01-17 11:19 ` James Bottomley
2013-01-17 11:40 ` Russell King - ARM Linux
2013-01-17 14:58 ` Subhash Jadavani
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=1358413880.2394.7.camel@dabdike.int.hansenpartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=asias@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=martin.petersen@oracle.com \
--cc=subhashj@codeaurora.org \
--cc=tj@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
all inboxes | Powered by JetHome®