All of lore.kernel.org
 help / color / mirror / Atom feed
From: Geliang Tang <geliangtang@gmail.com>
To: Michal Simek <monstr@monstr.eu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Robin Murphy <robin.murphy@arm.com>,
	Hans-Christian Noren Egtvedt <egtvedt@samfundet.no>,
	Joerg Roedel <jroedel@suse.de>,
	Bart Van Assche <bart.vanassche@sandisk.com>,
	Alexander Duyck <alexander.h.duyck@intel.com>,
	Krzysztof Kozlowski <krzk@kernel.org>
Cc: Geliang Tang <geliangtang@gmail.com>, linux-kernel@vger.kernel.org
Subject: [PATCH] microblaze: use sg_phys()
Date: Thu, 23 Mar 2017 21:16:32 +0800	[thread overview]
Message-ID: <b0f4fb7f2dac44996e461e729fdcdefc3e3f594d.1490258928.git.geliangtang@gmail.com> (raw)
In-Reply-To: <a41fae798473b657f09859ae113403655b1717f9.1490258141.git.geliangtang@gmail.com>

Use sg_phys() instead of open-coding it.

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
---
 arch/microblaze/kernel/dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c
index 12e093a..e45ada8 100644
--- a/arch/microblaze/kernel/dma.c
+++ b/arch/microblaze/kernel/dma.c
@@ -65,8 +65,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl,
 		if (attrs & DMA_ATTR_SKIP_CPU_SYNC)
 			continue;
 
-		__dma_sync(page_to_phys(sg_page(sg)) + sg->offset,
-							sg->length, direction);
+		__dma_sync(sg_phys(sg), sg->length, direction);
 	}
 
 	return nents;
-- 
2.9.3

  parent reply	other threads:[~2017-03-23 13:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-23 13:16 [PATCH] crypto: ixp4xx - Use sg_virt() Geliang Tang
2017-03-23 13:16 ` [PATCH] iommu: use sg_phys() Geliang Tang
2017-03-23 13:16 ` Geliang Tang [this message]
2017-05-29  9:00   ` [PATCH] microblaze: " Michal Simek
2017-03-23 13:16 ` [PATCH] qla2xxx: use sg_virt() Geliang Tang
2017-03-23 17:48 ` [PATCH] crypto: ixp4xx - Use sg_virt() David Miller
2017-03-24 14:17 ` Herbert Xu

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=b0f4fb7f2dac44996e461e729fdcdefc3e3f594d.1490258928.git.geliangtang@gmail.com \
    --to=geliangtang@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.h.duyck@intel.com \
    --cc=bart.vanassche@sandisk.com \
    --cc=egtvedt@samfundet.no \
    --cc=jroedel@suse.de \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=robin.murphy@arm.com \
    /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.