Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1296386

[POC][PATCH 40/83] nios2: dma_free_coherent(): get rid of pointless casts

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject [POC][PATCH 40/83] nios2: dma_free_coherent(): get rid of pointless casts
Date 2015-12-22 01:10 +0100
Message-ID <qIiGF-50N-79@gated-at.bofh.it> (permalink)
References <qIing-4Eb-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: Al Viro <viro@zeniv.linux.org.uk>

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/nios2/mm/dma-mapping.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/arch/nios2/mm/dma-mapping.c b/arch/nios2/mm/dma-mapping.c
index fa242ab..0195f8f 100644
--- a/arch/nios2/mm/dma-mapping.c
+++ b/arch/nios2/mm/dma-mapping.c
@@ -50,9 +50,7 @@ EXPORT_SYMBOL(dma_alloc_coherent);
 void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
 			dma_addr_t dma_handle)
 {
-	unsigned long addr = (unsigned long) CAC_ADDR((unsigned long) vaddr);
-
-	free_pages((void *)addr, get_order(size));
+	free_pages(CAC_ADDR(vaddr), get_order(size));
 }
 EXPORT_SYMBOL(dma_free_coherent);
 
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[POC][PATCH 40/83] nios2: dma_free_coherent(): get rid of pointless casts Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-22 01:10 +0100

csiph-web