Blame SOURCES/0142-scsi-scsi-qla2xxx-Uninline-qla2x00_init_timer.patch

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