[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180617100006.30663-4-leon@kernel.org>
Date: Sun, 17 Jun 2018 12:59:49 +0300
From: Leon Romanovsky <leon@...nel.org>
To: Doug Ledford <dledford@...hat.com>,
Jason Gunthorpe <jgg@...lanox.com>
Cc: Leon Romanovsky <leonro@...lanox.com>,
RDMA mailing list <linux-rdma@...r.kernel.org>,
Joonas Lahtinen <joonas.lahtinen@...ux.intel.com>,
Matan Barak <matanb@...lanox.com>,
Yishai Hadas <yishaih@...lanox.com>,
Saeed Mahameed <saeedm@...lanox.com>,
linux-netdev <netdev@...r.kernel.org>
Subject: [PATCH rdma-next v2 03/20] kernel.h: Reuse u64_to_ptr macro to cast __user pointers
From: Leon Romanovsky <leonro@...lanox.com>
Redefine u64_to_user_ptr() macro to be implemented with u64_to_ptr().
Signed-off-by: Leon Romanovsky <leonro@...lanox.com>
---
include/linux/kernel.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/linux/kernel.h b/include/linux/kernel.h
index 7d60a3472929..3012ae2f52f7 100644
--- a/include/linux/kernel.h
+++ b/include/linux/kernel.h
@@ -83,12 +83,7 @@ static inline u64 ptr_to_u64(const void *ptr)
} \
)
-#define u64_to_user_ptr(x) ( \
-{ \
- typecheck(u64, x); \
- (void __user *)(uintptr_t)x; \
-} \
-)
+#define u64_to_user_ptr(x) u64_to_ptr(void __user, x)
/*
* This looks more complex than it should be. But we need to
--
2.14.4
Powered by blists - more mailing lists