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


Groups > linux.kernel > #1296375

[POC][PATCH 43/83] arm64 vdso: get rid of pointless casts

From Al Viro <viro@ZenIV.linux.org.uk>
Newsgroups linux.kernel
Subject [POC][PATCH 43/83] arm64 vdso: get rid of pointless casts
Date 2015-12-22 01:10 +0100
Message-ID <qIiGE-50N-57@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>

... with two added to cope with flush_icache_range() calling
conventions

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
---
 arch/arm64/kernel/vdso.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/arch/arm64/kernel/vdso.c b/arch/arm64/kernel/vdso.c
index 07e4d14..f49e158 100644
--- a/arch/arm64/kernel/vdso.c
+++ b/arch/arm64/kernel/vdso.c
@@ -62,22 +62,21 @@ static int alloc_vectors_page(void)
 
 	int kuser_sz = __kuser_helper_end - __kuser_helper_start;
 	int sigret_sz = __aarch32_sigret_code_end - __aarch32_sigret_code_start;
-	unsigned long vpage;
-
-	vpage = (unsigned long)get_zeroed_page(GFP_ATOMIC);
+	void *vpage = get_zeroed_page(GFP_ATOMIC);
 
 	if (!vpage)
 		return -ENOMEM;
 
 	/* kuser helpers */
-	memcpy((void *)vpage + 0x1000 - kuser_sz, __kuser_helper_start,
+	memcpy(vpage + 0x1000 - kuser_sz, __kuser_helper_start,
 		kuser_sz);
 
 	/* sigreturn code */
-	memcpy((void *)vpage + AARCH32_KERN_SIGRET_CODE_OFFSET,
+	memcpy(vpage + AARCH32_KERN_SIGRET_CODE_OFFSET,
                __aarch32_sigret_code_start, sigret_sz);
 
-	flush_icache_range(vpage, vpage + PAGE_SIZE);
+	flush_icache_range((unsigned long)vpage,
+			   (unsigned long)vpage + PAGE_SIZE);
 	vectors_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@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 43/83] arm64 vdso: get rid of pointless casts Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-22 01:10 +0100

csiph-web