@@ -82,7 +82,7 @@ iwpm_mapping_request *create_iwpm_map_request(struct nlmsghdr *req_nlh,
/* assochandle helps match iwpm request sent to remote peer with future iwpm accept/reject */
iwpm_map_req->assochandle = assochandle;
if (!assochandle)
- iwpm_map_req->assochandle = (__u64)iwpm_map_req;
+ iwpm_map_req->assochandle = (uintptr_t)iwpm_map_req;
memcpy(&iwpm_map_req->src_addr, src_addr, sizeof(struct sockaddr_storage));
/* keep record of remote IP address and port */
@@ -607,7 +607,7 @@ int hfi1_modify_srq(struct ibv_srq *ibsrq,
(sizeof(struct ibv_sge) * srq->rq.max_sge)) *
srq->rq.size;
}
- cmd.offset_addr = (__u64) &offset;
+ cmd.offset_addr = (uintptr_t) &offset;
ret = ibv_cmd_modify_srq(ibsrq, attr, attr_mask,
&cmd.ibv_cmd, sizeof cmd);
if (ret) {
@@ -557,7 +557,7 @@ static int i40iw_vmapped_qp(struct i40iw_uqp *iwuqp, struct ibv_pd *pd,
return 0;
}
cmd.user_wqe_buffers = (__u64)((uintptr_t)info->sq);
- cmd.user_compl_ctx = (u64)&iwuqp->qp;
+ cmd.user_compl_ctx = (uintptr_t)&iwuqp->qp;
ret = ibv_cmd_create_qp(pd, &iwuqp->ibv_qp, attr, &cmd.ibv_cmd, sizeof(cmd),
&resp->ibv_resp, sizeof(struct i40iw_ucreate_qp_resp));
@@ -583,7 +583,7 @@ int ipath_modify_srq(struct ibv_srq *ibsrq,
(sizeof(struct ibv_sge) * srq->rq.max_sge)) *
srq->rq.size;
}
- cmd.offset_addr = (__u64) &offset;
+ cmd.offset_addr = (uintptr_t) &offset;
ret = ibv_cmd_modify_srq(ibsrq, attr, attr_mask,
&cmd.ibv_cmd, sizeof cmd);
if (ret) {
@@ -4290,7 +4290,7 @@ static void tcp_svc_send_keepalive(struct rsocket *rs)
if (rs_ctrl_avail(rs) && (rs->state & rs_connected)) {
rs->ctrl_seqno++;
rs_post_write(rs, NULL, 0, rs_msg_set(RS_OP_CTRL, RS_CTRL_KEEPALIVE),
- 0, (uint64_t) NULL, (uint64_t) NULL);
+ 0, (uintptr_t) NULL, (uintptr_t) NULL);
}
fastlock_release(&rs->cq_lock);
}
In C99 casting a pointer to an integer should always be done via uintptr_t. When compiling on 32 bit all these sites produce warnings. Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com> --- iwpm/src/iwarp_pm_helper.c | 2 +- libhfi1verbs/src/verbs.c | 2 +- libi40iw/src/i40iw_uverbs.c | 2 +- libipathverbs/src/verbs.c | 2 +- librdmacm/src/rsocket.c | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)