summaryrefslogtreecommitdiffstats
path: root/sys/ofed
diff options
context:
space:
mode:
authorhselasky <hselasky@FreeBSD.org>2015-11-12 10:12:20 +0000
committerhselasky <hselasky@FreeBSD.org>2015-11-12 10:12:20 +0000
commit109297af091c4ab4d080939242fd84dafb6db503 (patch)
treeda9a2217782e1fd5ad9c3a965234c088ab33a6f3 /sys/ofed
parentee5ff7b1cd6f8d92febd5b1ae25b11bf3dd4003b (diff)
downloadFreeBSD-src-109297af091c4ab4d080939242fd84dafb6db503.zip
FreeBSD-src-109297af091c4ab4d080939242fd84dafb6db503.tar.gz
Fix integer to pointer of different size conversion warnings when
using GCC for 32-bit platforms. The integer size in this case is hardcoded 64-bit while the pointer size is 32-bit. Sponsored by: Mellanox Technologies MFC after: 2 weeks
Diffstat (limited to 'sys/ofed')
-rw-r--r--sys/ofed/drivers/infiniband/core/uverbs_cmd.c5
-rw-r--r--sys/ofed/drivers/infiniband/core/uverbs_main.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/sys/ofed/drivers/infiniband/core/uverbs_cmd.c b/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
index 5eef3f7..7af7638 100644
--- a/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
+++ b/sys/ofed/drivers/infiniband/core/uverbs_cmd.c
@@ -1379,7 +1379,8 @@ ssize_t ib_uverbs_create_cq(struct ib_uverbs_file *file,
return -EFAULT;
return create_cq(file, buf, in_len, out_len, &cmd,
- IB_USER_VERBS_CMD_BASIC, (void __user *)cmd.response);
+ IB_USER_VERBS_CMD_BASIC,
+ (void __user *) (unsigned long) cmd.response);
}
ssize_t ib_uverbs_resize_cq(struct ib_uverbs_file *file,
@@ -1609,7 +1610,7 @@ ssize_t ib_uverbs_create_qp(struct ib_uverbs_file *file,
if (copy_from_user(&cmd_obj, buf, cmd_size))
return -EFAULT;
- response = (void __user *)cmd->response;
+ response = (void __user *) (unsigned long) cmd->response;
if (!disable_raw_qp_enforcement &&
cmd->qp_type == IB_QPT_RAW_PACKET && !priv_check(curthread, PRIV_NET_RAW))
diff --git a/sys/ofed/drivers/infiniband/core/uverbs_main.c b/sys/ofed/drivers/infiniband/core/uverbs_main.c
index 5a6b605..beec1c8 100644
--- a/sys/ofed/drivers/infiniband/core/uverbs_main.c
+++ b/sys/ofed/drivers/infiniband/core/uverbs_main.c
@@ -81,8 +81,8 @@ static struct ib_udata_ops uverbs_copy_ex = {
#define INIT_UDATA_EX(udata, ibuf, obuf, ilen, olen) \
do { \
(udata)->ops = &uverbs_copy_ex; \
- (udata)->inbuf = (void __user *)(ibuf); \
- (udata)->outbuf = (void __user *)(obuf); \
+ (udata)->inbuf = (void __user *)(unsigned long)(ibuf); \
+ (udata)->outbuf = (void __user *)(unsigned long)(obuf); \
(udata)->inlen = (ilen); \
(udata)->outlen = (olen); \
} while (0)
OpenPOWER on IntegriCloud