IB/rxe: use setup_timer to simplify the code
Subsystems (2)
PATCH 1/1 IB/rxe: use setup_timer to simplify the code
From: Wei Yongjun <[email protected]>
Use setup_timer function instead of initializing timer with the function and data fields.
--- drivers/infiniband/sw/rxe/rxe_qp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/infiniband/sw/rxe/rxe_qp.c +2 -7
@@ -273,13 +273,8 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp,rxe_init_task (rxe, &qp->comp.task, qp, rxe_completer,"comp" ); -init_timer (&qp->rnr_nak_timer); - qp->rnr_nak_timer.function = rnr_nak_timer; - qp->rnr_nak_timer.data = (unsigned long )qp; - -init_timer (&qp->retrans_timer); - qp->retrans_timer.function = retransmit_timer; - qp->retrans_timer.data = (unsigned long )qp; +setup_timer (&qp->rnr_nak_timer, rnr_nak_timer, (unsigned long )qp); +setup_timer (&qp->retrans_timer, retransmit_timer, (unsigned long )qp); qp->qp_timeout_jiffies =0 ;/* Can't be set for UD/UC in modify_qp */ return 0 ;
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170207151510.12503-1-weiyj.lk-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
Leon Romanovsky
Reviewed-byQuoted 10 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Use
setup_timerfunction instead of initializing timer with the function and data fields.Signed-off-by Wei Yongjun <[email protected]>--- drivers/infiniband/sw/rxe/rxe_qp.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
Thanks,
Doug Ledford
AppliedQuoted 7 lines · Wei Yongjun
From: Wei Yongjun <[email protected]>
Use
setup_timerfunction instead of initializing timer with the function
and data fields.Signed-off-by Wei Yongjun <[email protected]>
Thanks, applied.
Signature · 4 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD