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


Groups > linux.kernel > #1296375 > unrolled thread

[POC][PATCH 43/83] arm64 vdso: 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 43/83] arm64 vdso: get rid of pointless casts Al Viro <viro@ZenIV.linux.org.uk> - 2015-12-22 01:10 +0100

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

FromAl Viro <viro@ZenIV.linux.org.uk>
Date2015-12-22 01:10 +0100
Subject[POC][PATCH 43/83] arm64 vdso: get rid of pointless casts
Message-ID<qIiGE-50N-57@gated-at.bofh.it>
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/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web