[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1450741676-5865-83-git-send-email-viro@ZenIV.linux.org.uk>
Date: Mon, 21 Dec 2015 23:47:56 +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 83/83] nios2: get rid of pointless casts
From: Al Viro <viro@...iv.linux.org.uk>
flush_icache_range() really looks like a candidate for conversion
to taking void * as arguments...
Signed-off-by: Al Viro <viro@...iv.linux.org.uk>
---
arch/nios2/mm/init.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/nios2/mm/init.c b/arch/nios2/mm/init.c
index e03a757..b76ad1d 100644
--- a/arch/nios2/mm/init.c
+++ b/arch/nios2/mm/init.c
@@ -103,16 +103,16 @@ static int alloc_kuser_page(void)
{
extern char __kuser_helper_start[], __kuser_helper_end[];
int kuser_sz = __kuser_helper_end - __kuser_helper_start;
- unsigned long vpage;
+ void *vpage = get_zeroed_page(GFP_ATOMIC);
- vpage = (unsigned long)get_zeroed_page(GFP_ATOMIC);
if (!vpage)
return -ENOMEM;
/* Copy kuser helpers */
- memcpy((void *)vpage, __kuser_helper_start, kuser_sz);
+ memcpy(vpage, __kuser_helper_start, kuser_sz);
- flush_icache_range(vpage, vpage + KUSER_SIZE);
+ flush_icache_range((unsigned long)vpage,
+ (unsigned long)vpage + KUSER_SIZE);
kuser_page[0] = virt_to_page(vpage);
return 0;
--
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