[POC][PATCH 69/83] ps3_alloc_coherent(): get rid of pointless casts

From: Al Viro
Date: Mon Dec 21 2015 - 18:52:25 EST


From: Al Viro <viro@xxxxxxxxxxxxxxxxxx>

Signed-off-by: Al Viro <viro@xxxxxxxxxxxxxxxxxx>
---
arch/powerpc/platforms/ps3/system-bus.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/arch/powerpc/platforms/ps3/system-bus.c b/arch/powerpc/platforms/ps3/system-bus.c
index 988f8eb..bb358ab 100644
--- a/arch/powerpc/platforms/ps3/system-bus.c
+++ b/arch/powerpc/platforms/ps3/system-bus.c
@@ -520,12 +520,12 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
{
int result;
struct ps3_system_bus_device *dev = ps3_dev_to_system_bus_dev(_dev);
- unsigned long virt_addr;
+ void *virt_addr;

flag &= ~(__GFP_DMA | __GFP_HIGHMEM);
flag |= __GFP_ZERO;

- virt_addr = __get_free_pages(flag, get_order(size));
+ virt_addr = get_free_pages(flag, get_order(size));

if (!virt_addr) {
pr_debug("%s:%d: get_free_pages failed\n", __func__, __LINE__);
@@ -543,10 +543,10 @@ static void * ps3_alloc_coherent(struct device *_dev, size_t size,
goto clean_alloc;
}

- return (void*)virt_addr;
+ return virt_addr;

clean_alloc:
- free_pages((void *)virt_addr, get_order(size));
+ free_pages(virt_addr, get_order(size));
clean_none:
dma_handle = NULL;
return NULL;
--
2.1.4

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