From 13059106242bc96f8f5ab79c0f6cb15c7b756f40 Mon Sep 17 00:00:00 2001 From: Kees Cook Date: Thu, 21 Sep 2017 13:12:15 -0700 Subject: scsi: fcoe: 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: QLogic-Storage-Upstream@qlogic.com Cc: "James E.J. Bottomley" Cc: "Martin K. Petersen" Cc: Johannes Thumshirn Cc: linux-scsi@vger.kernel.org Cc: fcoe-devel@open-fcoe.org Signed-off-by: Kees Cook Acked-by: Johannes Thumshirn --- drivers/scsi/fcoe/fcoe.c | 2 +- drivers/scsi/fcoe/fcoe_transport.c | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'drivers/scsi/fcoe') diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index 85f9a3eba387..5cc09dce4d25 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -754,7 +754,7 @@ static int fcoe_netdev_config(struct fc_lport *lport, struct net_device *netdev) skb_queue_head_init(&port->fcoe_pending_queue); port->fcoe_pending_queue_active = 0; - setup_timer(&port->timer, fcoe_queue_timer, (unsigned long)lport); + timer_setup(&port->timer, fcoe_queue_timer, 0); fcoe_link_speed_update(lport); diff --git a/drivers/scsi/fcoe/fcoe_transport.c b/drivers/scsi/fcoe/fcoe_transport.c index 375c536cbc68..1ba5f51713a3 100644 --- a/drivers/scsi/fcoe/fcoe_transport.c +++ b/drivers/scsi/fcoe/fcoe_transport.c @@ -455,9 +455,11 @@ EXPORT_SYMBOL_GPL(fcoe_check_wait_queue); * * Calls fcoe_check_wait_queue on timeout */ -void fcoe_queue_timer(ulong lport) +void fcoe_queue_timer(struct timer_list *t) { - fcoe_check_wait_queue((struct fc_lport *)lport, NULL); + struct fcoe_port *port = from_timer(port, t, timer); + + fcoe_check_wait_queue(port->lport, NULL); } EXPORT_SYMBOL_GPL(fcoe_queue_timer); -- cgit v1.2.3