IB/rxe: Convert timers to use timer_setup()
Subsystems (2)
PATCH 1/1 IB/rxe: Convert timers to use timer_setup()
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly.
Cc Moni Shoua <monis-VPRAkNaXOzVWk0Htik3J/[email protected]>
Cc Doug Ledford <[email protected]>
Cc Sean Hefty <[email protected]>
Cc Hal Rosenstock <[email protected]>
Signed-off-by Kees Cook <[email protected]>
--- drivers/infiniband/sw/rxe/rxe_comp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_loc.h | 4 ++-- drivers/infiniband/sw/rxe/rxe_qp.c | 4 ++-- drivers/infiniband/sw/rxe/rxe_req.c | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-)
drivers/infiniband/sw/rxe/rxe_comp.c +2 -2
@@ -136,9 +136,9 @@ static enum ib_wc_opcode wr_to_wc_opcode(enum ib_wr_opcode opcode) } } -void retransmit_timer (unsigned long data) +void retransmit_timer (struct timer_list *t) { -struct rxe_qp *qp = (struct rxe_qp *)data; +struct rxe_qp *qp =from_timer (qp, t, retrans_timer);if (qp->valid) { qp->comp.timeout =1 ;
drivers/infiniband/sw/rxe/rxe_loc.h +2 -2
@@ -218,8 +218,8 @@ static inline void rxe_advance_resp_resource(struct rxe_qp *qp) qp->resp.res_head =0 ; } -void retransmit_timer (unsigned long data); -void rnr_nak_timer (unsigned long data); +void retransmit_timer (struct timer_list *t); +void rnr_nak_timer (struct timer_list *t);/* rxe_srq.c */ #define IB_SRQ_INIT_MASK (~IB_SRQ_LIMIT)
drivers/infiniband/sw/rxe/rxe_qp.c +2 -2
@@ -275,8 +275,8 @@ static int rxe_qp_init_req(struct rxe_dev *rxe, struct rxe_qp *qp, qp->qp_timeout_jiffies =0 ;/* Can't be set for UD/UC in modify_qp */ if (init->qp_type ==IB_QPT_RC ) { -setup_timer (&qp->rnr_nak_timer, rnr_nak_timer, (unsigned long )qp); -setup_timer (&qp->retrans_timer, retransmit_timer, (unsigned long )qp); +timer_setup (&qp->rnr_nak_timer, rnr_nak_timer,0 ); +timer_setup (&qp->retrans_timer, retransmit_timer,0 ); }return 0 ; }
drivers/infiniband/sw/rxe/rxe_req.c +2 -2
@@ -118,9 +118,9 @@ static void req_retry(struct rxe_qp *qp) } } -void rnr_nak_timer (unsigned long data) +void rnr_nak_timer (struct timer_list *t) { -struct rxe_qp *qp = (struct rxe_qp *)data; +struct rxe_qp *qp =from_timer (qp, t, rnr_nak_timer);pr_debug ("qp#%d rnr nak timer fired\n" ,qp_num (qp));rxe_run_task (&qp->req.task,1 );
Signature · 10 lines
2.7.4 -- Kees Cook Pixel Security -- 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
Doug Ledford
AppliedQuoted 6 lines · Kees Cook
In preparation for unconditionally passing the struct
timer_listpointer to
all timer callbacks, switch to using the newtimer_setup()andfrom_timer()
to pass the timer pointer explicitly.
Quoted 6 lines
Cc Moni Shoua <[email protected]>Cc Doug Ledford <[email protected]>Cc Sean Hefty <[email protected]>Cc Hal Rosenstock <[email protected]>Signed-off-by Kees Cook <[email protected]>
Thanks, applied.
Signature · 3 lines
Doug Ledford <[email protected]> GPG KeyID: B826A3330E572FDD Key fingerprint = AE6B 1BDA 122B 23B4 265B 1274 B826 A333 0E57 2FDD