]> git.baikalelectronics.ru Git - kernel.git/commit
scsi: lpfc: replace init_timer by setup_timer
authorTomas Jasek <tomsik68@gmail.com>
Fri, 3 Mar 2017 12:45:48 +0000 (13:45 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 7 Mar 2017 03:48:49 +0000 (22:48 -0500)
commit52eb3b9743d6f948d4fc872115cf49340fbb8d1c
treea5a5f52b443050198daedea31f2208c441cfa7ec
parentd78b89918ea3b1e7627a0af0d23953c0a514d2eb
scsi: lpfc: replace init_timer by setup_timer

This patch shortens every init_timer in lpfc module followed by function
and data assignment using setup_timer.  This is purely cleanup patch, it
does not add new functionality nor remove any existing functionality.

An init_timer call in this form:

    init_timer(&vport->fc_disctmo);
    vport->fc_disctmo.function = lpfc_disc_timeout;
    vport->fc_disctmo.data = vport;

is shortened to:

    setup_timer(&vport->fc_disctmo, lpfc_disc_timeout, vport);

It increases readability and reduces chances of mistakes done by
developers.

Signed-off-by: Tomas Jasek <tomsik68@gmail.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: James Smart <james.smart@broadcom.com>
Cc: Dick Kennedy <dick.kennedy@broadcom.com>
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: <linux-scsi@vger.kernel.org>
Acked-by: James Smart <james.smart@broadcom.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_hbadisc.c
drivers/scsi/lpfc/lpfc_init.c