From: Dotan Barak Date: Tue, 24 Apr 2012 18:50:48 +0000 (-0700) Subject: Since "private" is a reserved word in C++, it shouldn't be used as a name of a X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=85bc9242fb5018ea3a7a550e6511bd081938117f;p=~shefty%2Flibibverbs.git Since "private" is a reserved word in C++, it shouldn't be used as a name of a structure attribute. Signed-off-by: Dotan Barak Reviewed-by: Jack Morgenstein Signed-off-by: Sean Hefty --- diff --git a/include/infiniband/ofverbs.h b/include/infiniband/ofverbs.h index b03d7ae..841e689 100644 --- a/include/infiniband/ofverbs.h +++ b/include/infiniband/ofverbs.h @@ -102,7 +102,7 @@ struct ofv_async_event { uint32_t xrc_qp_num; } element; enum ibv_event_type event_type; - void *private; + void *private_data; }; int ofv_get_async_event(struct ibv_context *context, diff --git a/include/infiniband/verbs.h b/include/infiniband/verbs.h index 1dcd17f..ddc8722 100644 --- a/include/infiniband/verbs.h +++ b/include/infiniband/verbs.h @@ -706,7 +706,7 @@ struct ibv_device { char ibdev_path[IBV_SYSFS_PATH_MAX]; /* Following fields only available if device supports extensions */ - void *private; + void *private_data; int (*have_ext_ops)(struct ibv_device *device, const char *ext_name); void * (*get_device_ext_ops)(struct ibv_device *device, @@ -791,7 +791,7 @@ struct ibv_context { void *abi_compat; /* Following fields only available if device supports extensions */ - void *private; + void *private_data; void * (*get_ext_ops)(struct ibv_context *context, const char *ext_name); }; diff --git a/src/ofverbs.c b/src/ofverbs.c index 0486552..2ee5e81 100644 --- a/src/ofverbs.c +++ b/src/ofverbs.c @@ -61,7 +61,7 @@ int __ofv_get_async_event(struct ibv_context *context, case IBV_EVENT_PATH_MIG_ERR: case IBV_EVENT_QP_LAST_WQE_REACHED: if (event->element.qp->qp_type == IBV_QPT_XRC_RECV) { - event->private = event->element.qp; + event->private_data = event->element.qp; event->event_type |= OFV_XRC_QP_EVENT_FLAG; event->element.xrc_qp_num = event->element.qp->qp_num; } @@ -76,7 +76,7 @@ default_symver(__ofv_get_async_event, ofv_get_async_event); void ofv_ack_async_event(struct ofv_async_event *event) { if (event->event_type & OFV_XRC_QP_EVENT_FLAG) { - event->element.qp = event->private; + event->element.qp = event->private_data; event->event_type &= ~OFV_XRC_QP_EVENT_FLAG; } ibv_ack_async_event((struct ibv_async_event *) event);