RDMA/nes: 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. A pointer from nesadapter back to nesdev was added. Cc: Faisal Latif <faisal.latif@intel.com> Cc: Doug Ledford <dledford@redhat.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Cc: linux-rdma@vger.kernel.org Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
@@ -840,7 +840,7 @@ static void handle_recv_entry(struct nes_cm_node *cm_node, u32 rem_node)
|
||||
/**
|
||||
* nes_cm_timer_tick
|
||||
*/
|
||||
static void nes_cm_timer_tick(unsigned long pass)
|
||||
static void nes_cm_timer_tick(struct timer_list *unused)
|
||||
{
|
||||
unsigned long flags;
|
||||
unsigned long nexttimeout = jiffies + NES_LONG_TIME;
|
||||
@@ -2670,8 +2670,7 @@ static struct nes_cm_core *nes_cm_alloc_core(void)
|
||||
return NULL;
|
||||
|
||||
INIT_LIST_HEAD(&cm_core->connected_nodes);
|
||||
init_timer(&cm_core->tcp_timer);
|
||||
cm_core->tcp_timer.function = nes_cm_timer_tick;
|
||||
timer_setup(&cm_core->tcp_timer, nes_cm_timer_tick, 0);
|
||||
|
||||
cm_core->mtu = NES_CM_DEFAULT_MTU;
|
||||
cm_core->state = NES_CM_STATE_INITED;
|
||||
|
Reference in New Issue
Block a user