aboutsummaryrefslogtreecommitdiffstats
path: root/include/rdma/rdma_cm.h
diff options
context:
space:
mode:
authorLeon Romanovsky <leonro@mellanox.com>2018-10-11 17:30:05 +0300
committerDoug Ledford <dledford@redhat.com>2018-10-16 13:34:01 -0400
commitdbace111e5b320682eee63d7173959a2b2bd9ccb (patch)
tree5f64c5d7ea0fb522b70f30e418f5576491b57109 /include/rdma/rdma_cm.h
parentRDMA/core: Align multiple functions to kernel coding style (diff)
downloadlinux-dev-dbace111e5b320682eee63d7173959a2b2bd9ccb.tar.xz
linux-dev-dbace111e5b320682eee63d7173959a2b2bd9ccb.zip
RDMA/core: Annotate timeout as unsigned long
The ucma users supply timeout in u32 format, it means that any number with most significant bit set will be converted to negative value by various rdma_*, cma_* and sa_query functions, which treat timeout as int. In the lowest level, the timeout is converted back to be unsigned long. Remove this ambiguous conversion by updating all function signatures to receive unsigned long. Reported-by: Noa Osherovich <noaos@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to '')
-rw-r--r--include/rdma/rdma_cm.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/rdma/rdma_cm.h b/include/rdma/rdma_cm.h
index 53d93c7d8e01..60987a5903b7 100644
--- a/include/rdma/rdma_cm.h
+++ b/include/rdma/rdma_cm.h
@@ -196,7 +196,8 @@ int rdma_bind_addr(struct rdma_cm_id *id, struct sockaddr *addr);
* @timeout_ms: Time to wait for resolution to complete.
*/
int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr,
- const struct sockaddr *dst_addr, int timeout_ms);
+ const struct sockaddr *dst_addr,
+ unsigned long timeout_ms);
/**
* rdma_resolve_route - Resolve the RDMA address bound to the RDMA identifier
@@ -206,7 +207,7 @@ int rdma_resolve_addr(struct rdma_cm_id *id, struct sockaddr *src_addr,
* Users must have first called rdma_resolve_addr to resolve a dst_addr
* into an RDMA address before calling this routine.
*/
-int rdma_resolve_route(struct rdma_cm_id *id, int timeout_ms);
+int rdma_resolve_route(struct rdma_cm_id *id, unsigned long timeout_ms);
/**
* rdma_create_qp - Allocate a QP and associate it with the specified RDMA