[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-37-git-send-email-viro@ZenIV.linux.org.uk>
Date: Mon, 21 Dec 2015 23:47:10 +0000
From: Al Viro <viro@...IV.linux.org.uk>
To: linux-kernel@...r.kernel.org
Cc: Linus Torvalds <torvalds@...ux-foundation.org>
Subject: [POC][PATCH 37/83] ste_dma40: get rid of pointless casts
From: Al Viro <viro@...iv.linux.org.uk>
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
drivers/dma/ste_dma40.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/dma/ste_dma40.c b/drivers/dma/ste_dma40.c
index 2971d47..e2e0225 100644
--- a/drivers/dma/ste_dma40.c
+++ b/drivers/dma/ste_dma40.c
@@ -3404,7 +3404,7 @@ static void __init d40_hw_init(struct d40_base *base)
static int __init d40_lcla_allocate(struct d40_base *base)
{
struct d40_lcla_pool *pool = &base->lcla_pool;
- unsigned long *page_list;
+ void **page_list;
int i, j;
int ret = 0;
@@ -3413,7 +3413,7 @@ static int __init d40_lcla_allocate(struct d40_base *base)
* To full fill this hardware requirement without wasting 256 kb
* we allocate pages until we get an aligned one.
*/
- page_list = kmalloc(sizeof(unsigned long) * MAX_LCLA_ALLOC_ATTEMPTS,
+ page_list = kmalloc(sizeof(void *) * MAX_LCLA_ALLOC_ATTEMPTS,
GFP_KERNEL);
if (!page_list) {
@@ -3425,7 +3425,7 @@ static int __init d40_lcla_allocate(struct d40_base *base)
base->lcla_pool.pages = SZ_1K * base->num_phy_chans / PAGE_SIZE;
for (i = 0; i < MAX_LCLA_ALLOC_ATTEMPTS; i++) {
- page_list[i] = __get_free_pages(GFP_KERNEL,
+ page_list[i] = (void *)__get_free_pages(GFP_KERNEL,
base->lcla_pool.pages);
if (!page_list[i]) {
@@ -3434,20 +3434,20 @@ static int __init d40_lcla_allocate(struct d40_base *base)
ret = -ENOMEM;
for (j = 0; j < i; j++)
- free_pages((void *)page_list[j], base->lcla_pool.pages);
+ free_pages(page_list[j], base->lcla_pool.pages);
goto failure;
}
- if ((virt_to_phys((void *)page_list[i]) &
+ if ((virt_to_phys(page_list[i]) &
(LCLA_ALIGNMENT - 1)) == 0)
break;
}
for (j = 0; j < i; j++)
- free_pages((void *)page_list[j], base->lcla_pool.pages);
+ free_pages(page_list[j], base->lcla_pool.pages);
if (i < MAX_LCLA_ALLOC_ATTEMPTS) {
- base->lcla_pool.base = (void *)page_list[i];
+ base->lcla_pool.base = page_list[i];
} else {
/*
* After many attempts and no succees with finding the correct
--
2.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists