From 70d8d932d3b4fdd4da49090830fe3de192d9ff49 Mon Sep 17 00:00:00 2001 From: Himanshu Madhani Date: Thu, 21 Nov 2019 16:36:52 -0500 Subject: [PATCH 142/155] [scsi] scsi: qla2xxx: Uninline qla2x00_init_timer() Message-id: <20191121163701.43688-18-hmadhani@redhat.com> Patchwork-id: 287867 O-Subject: [RHLE 7.8 e-stor PATCH v3 17/26] scsi: qla2xxx: Uninline qla2x00_init_timer() Bugzilla: 1731581 RH-Acked-by: Jarod Wilson RH-Acked-by: Ewan Milne RH-Acked-by: Tony Camuso From: Bart Van Assche Bugzilla 1731581 Since qla2x00_init_timer() is not used for I/O commands there is no need to inline this function. Hence uninline this function. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche Acked-by: Himanshu Madhani Signed-off-by: Martin K. Petersen (cherry picked from commit 12975426d8889ce42821e9e0348f9a2da343779a) Signed-off-by: Himanshu Madhani [ hmadhani: RH src uses older API for timer intilialization. ] [ This patches preserves older APIs while moving code from ] [ qla_inline.h to qla_iocb.c ] Conflicts: drivers/scsi/qla2xxx/qla_inline.h Signed-off-by: Himanshu Madhani Signed-off-by: Jan Stancek --- drivers/scsi/qla2xxx/qla_gbl.h | 1 + drivers/scsi/qla2xxx/qla_inline.h | 13 ------------- drivers/scsi/qla2xxx/qla_iocb.c | 12 ++++++++++++ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_gbl.h b/drivers/scsi/qla2xxx/qla_gbl.h index e0b1f0652403..6d46518f4e9a 100644 --- a/drivers/scsi/qla2xxx/qla_gbl.h +++ b/drivers/scsi/qla2xxx/qla_gbl.h @@ -283,6 +283,7 @@ extern int qla2x00_start_sp(srb_t *); extern int qla24xx_dif_start_scsi(srb_t *); extern int qla2x00_start_bidir(srb_t *, struct scsi_qla_host *, uint32_t); extern int qla2xxx_dif_start_scsi_mq(srb_t *); +extern void qla2x00_init_timer(srb_t *sp, unsigned long tmo); extern unsigned long qla2x00_get_async_timeout(struct scsi_qla_host *); extern void *qla2x00_alloc_iocbs(struct scsi_qla_host *, srb_t *); diff --git a/drivers/scsi/qla2xxx/qla_inline.h b/drivers/scsi/qla2xxx/qla_inline.h index 9312bc4053c1..d728b179e347 100644 --- a/drivers/scsi/qla2xxx/qla_inline.h +++ b/drivers/scsi/qla2xxx/qla_inline.h @@ -221,19 +221,6 @@ qla2x00_rel_sp(srb_t *sp) qla2xxx_rel_qpair_sp(sp->qpair, sp); } -static inline void -qla2x00_init_timer(srb_t *sp, unsigned long tmo) -{ - init_timer(&sp->u.iocb_cmd.timer); - sp->u.iocb_cmd.timer.expires = jiffies + tmo * HZ; - sp->u.iocb_cmd.timer.data = (unsigned long)sp; - sp->u.iocb_cmd.timer.function = qla2x00_sp_timeout; - sp->free = qla2x00_sp_free; - if (IS_QLAFX00(sp->vha->hw) && (sp->type == SRB_FXIOCB_DCMD)) - init_completion(&sp->u.iocb_cmd.u.fxiocb.fxiocb_comp); - add_timer(&sp->u.iocb_cmd.timer); -} - static inline int qla2x00_gid_list_size(struct qla_hw_data *ha) { diff --git a/drivers/scsi/qla2xxx/qla_iocb.c b/drivers/scsi/qla2xxx/qla_iocb.c index 186ee5825651..c1f3b7a0f950 100644 --- a/drivers/scsi/qla2xxx/qla_iocb.c +++ b/drivers/scsi/qla2xxx/qla_iocb.c @@ -2607,6 +2607,18 @@ qla24xx_tm_iocb(srb_t *sp, struct tsk_mgmt_entry *tsk) } } +void qla2x00_init_timer(srb_t *sp, unsigned long tmo) +{ + init_timer(&sp->u.iocb_cmd.timer); + sp->u.iocb_cmd.timer.expires = jiffies + tmo * HZ; + sp->u.iocb_cmd.timer.data = (unsigned long)sp; + sp->u.iocb_cmd.timer.function = qla2x00_sp_timeout; + sp->free = qla2x00_sp_free; + if (IS_QLAFX00(sp->vha->hw) && (sp->type == SRB_FXIOCB_DCMD)) + init_completion(&sp->u.iocb_cmd.u.fxiocb.fxiocb_comp); + add_timer(&sp->u.iocb_cmd.timer); +} + static void qla2x00_els_dcmd_sp_free(void *data) { -- 2.13.6