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


Groups > linux.kernel > #1296386 > unrolled thread

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

Started byAl Viro <viro@ZenIV.linux.org.uk>
First post2015-12-22 01:10 +0100
Last post2015-12-22 01:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [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

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

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2015-12-22 01:10 +0100
Subject[POC][PATCH 40/83] nios2: dma_free_coherent(): get rid of pointless casts
Message-ID<qIiGF-50N-79@gated-at.bofh.it>
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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web