From: Leon Romanovsky <leonro@xxxxxxxxxxxx> Use new get/set macros to access REQ remote response timeout. Signed-off-by: Leon Romanovsky <leonro@xxxxxxxxxxxx> --- drivers/infiniband/core/cm.c | 6 +++--- drivers/infiniband/core/cm_msgs.h | 13 ------------- 2 files changed, 3 insertions(+), 16 deletions(-) diff --git a/drivers/infiniband/core/cm.c b/drivers/infiniband/core/cm.c index 519a025773ff..4e5c2ad1532e 100644 --- a/drivers/infiniband/core/cm.c +++ b/drivers/infiniband/core/cm.c @@ -1267,8 +1267,8 @@ static void cm_format_req(struct cm_req_msg *req_msg, req_msg->local_ca_guid = cm_id_priv->id.device->node_guid; CM_SET(REQ_LOCAL_QPN, req_msg, param->qp_num); CM_SET(REQ_INITIATOR_DEPTH, req_msg, param->initiator_depth); - cm_req_set_remote_resp_timeout(req_msg, - param->remote_cm_response_timeout); + CM_SET(REQ_REMOTE_CM_RESPONSE_TIMEOUT, req_msg, + param->remote_cm_response_timeout); cm_req_set_qp_type(req_msg, param->qp_type); cm_req_set_flow_ctrl(req_msg, param->flow_control); cm_req_set_starting_psn(req_msg, cpu_to_be32(param->starting_psn)); @@ -1673,7 +1673,7 @@ static void cm_format_req_event(struct cm_work *work, param->responder_resources = CM_GET(REQ_INITIATOR_DEPTH, req_msg); param->initiator_depth = CM_GET(REQ_RESPONDED_RESOURCES, req_msg); param->local_cm_response_timeout = - cm_req_get_remote_resp_timeout(req_msg); + CM_GET(REQ_REMOTE_CM_RESPONSE_TIMEOUT, req_msg); param->flow_control = cm_req_get_flow_ctrl(req_msg); param->remote_cm_response_timeout = cm_req_get_local_resp_timeout(req_msg); diff --git a/drivers/infiniband/core/cm_msgs.h b/drivers/infiniband/core/cm_msgs.h index 4f4531d38535..955a9a5ceeb7 100644 --- a/drivers/infiniband/core/cm_msgs.h +++ b/drivers/infiniband/core/cm_msgs.h @@ -400,19 +400,6 @@ struct cm_req_msg { } __packed; -static inline u8 cm_req_get_remote_resp_timeout(struct cm_req_msg *req_msg) -{ - return (u8) ((be32_to_cpu(req_msg->offset40) & 0xF8) >> 3); -} - -static inline void cm_req_set_remote_resp_timeout(struct cm_req_msg *req_msg, - u8 resp_timeout) -{ - req_msg->offset40 = cpu_to_be32((resp_timeout << 3) | - (be32_to_cpu(req_msg->offset40) & - 0xFFFFFF07)); -} - static inline enum ib_qp_type cm_req_get_qp_type(struct cm_req_msg *req_msg) { u8 transport_type = (u8) (be32_to_cpu(req_msg->offset40) & 0x06) >> 1; -- 2.20.1