From dac472216c722e57af90306535dc8100d4bc91ef Mon Sep 17 00:00:00 2001 From: Roman Kiryanov Date: Fri, 30 Mar 2018 14:55:02 -0700 Subject: ANDROID: Cleanup type casting in goldfish.h Bug: 72886167 Change-Id: I506a24e6e659d83a9df5efa0f8f00229e0a4b2d4 Signed-off-by: Roman Kiryanov --- include/linux/goldfish.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include/linux') diff --git a/include/linux/goldfish.h b/include/linux/goldfish.h index e7e6f7aff124..793590dcfb47 100644 --- a/include/linux/goldfish.h +++ b/include/linux/goldfish.h @@ -9,9 +9,11 @@ static inline void gf_write_ptr(const void *ptr, void __iomem *portl, void __iomem *porth) { - writel((u32)(unsigned long)ptr, portl); + const uintptr_t addr = (uintptr_t)ptr; + + writel((u32)addr, portl); #ifdef CONFIG_64BIT - writel((unsigned long)ptr >> 32, porth); + writel(addr >> 32, porth); #endif } -- cgit v1.2.3