From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pf0-x22b.google.com ([2607:f8b0:400e:c00::22b]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fKxmW-0002QL-JE for barebox@lists.infradead.org; Tue, 22 May 2018 03:16:36 +0000 Received: by mail-pf0-x22b.google.com with SMTP id p12-v6so8020742pff.13 for ; Mon, 21 May 2018 20:16:02 -0700 (PDT) From: Andrey Smirnov Date: Mon, 21 May 2018 20:15:06 -0700 Message-Id: <20180522031510.25505-26-andrew.smirnov@gmail.com> In-Reply-To: <20180522031510.25505-1-andrew.smirnov@gmail.com> References: <20180522031510.25505-1-andrew.smirnov@gmail.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "barebox" Errors-To: barebox-bounces+u.kleine-koenig=pengutronix.de@lists.infradead.org Subject: [PATCH v4 25/29] ARM: mmu: Use dma_inv_range() in dma_sync_single_for_cpu() To: barebox@lists.infradead.org Cc: Andrey Smirnov The code in the if () statement is identical to already existing dma_inv_rand(). Use it instead. Reviewed-by: Lucas Stach Signed-off-by: Andrey Smirnov --- arch/arm/cpu/mmu.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/arch/arm/cpu/mmu.c b/arch/arm/cpu/mmu.c index f9e4d1a50..5e1e613d9 100644 --- a/arch/arm/cpu/mmu.c +++ b/arch/arm/cpu/mmu.c @@ -548,11 +548,8 @@ void dma_free_coherent(void *mem, dma_addr_t dma_handle, size_t size) void dma_sync_single_for_cpu(dma_addr_t address, size_t size, enum dma_data_direction dir) { - if (dir != DMA_TO_DEVICE) { - if (outer_cache.inv_range) - outer_cache.inv_range(address, address + size); - __dma_inv_range(address, address + size); - } + if (dir != DMA_TO_DEVICE) + dma_inv_range(address, address + size); } void dma_sync_single_for_device(dma_addr_t address, size_t size, -- 2.17.0 _______________________________________________ barebox mailing list barebox@lists.infradead.org http://lists.infradead.org/mailman/listinfo/barebox