From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934839AbdCWNRY (ORCPT ); Thu, 23 Mar 2017 09:17:24 -0400 Received: from mail-pf0-f193.google.com ([209.85.192.193]:33916 "EHLO mail-pf0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932509AbdCWNRW (ORCPT ); Thu, 23 Mar 2017 09:17:22 -0400 From: Geliang Tang To: Michal Simek , Andrew Morton , Robin Murphy , Hans-Christian Noren Egtvedt , Joerg Roedel , Bart Van Assche , Alexander Duyck , Krzysztof Kozlowski Cc: Geliang Tang , linux-kernel@vger.kernel.org Subject: [PATCH] microblaze: use sg_phys() Date: Thu, 23 Mar 2017 21:16:32 +0800 Message-Id: X-Mailer: git-send-email 2.9.3 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use sg_phys() instead of open-coding it. Signed-off-by: Geliang Tang --- 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