scsi: qla2xxx: Move qla2x00_set_fcport_state() from a .h into a .c file
authorBart Van Assche <bvanassche@acm.org>
Thu, 11 Apr 2019 21:53:25 +0000 (14:53 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Apr 2019 02:04:40 +0000 (22:04 -0400)
The qla2x00_set_fcport_state() function is not in the hot path so move its
definition from a .h into a .c file.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/qla2xxx/qla_gbl.h
drivers/scsi/qla2xxx/qla_init.c
drivers/scsi/qla2xxx/qla_inline.h

index 05c54cc4b78c724686820a4e4f5851812234b63c..034cfc152336da15c8e8bb1efaa27502d84ae72f 100644 (file)
@@ -80,6 +80,7 @@ int qla2x00_post_work(struct scsi_qla_host *vha, struct qla_work_evt *e);
 extern void *qla2x00_alloc_iocbs_ready(struct qla_qpair *, srb_t *);
 extern int qla24xx_update_fcport_fcp_prio(scsi_qla_host_t *, fc_port_t *);
 
+extern void qla2x00_set_fcport_state(fc_port_t *fcport, int state);
 extern fc_port_t *
 qla2x00_alloc_fcport(scsi_qla_host_t *, gfp_t );
 
index 02b463c8f3eb05c24e9eaca9511901f030f42a45..1ad4fbe762627a11cbc414dd4c9e40dcac56621e 100644 (file)
@@ -4757,6 +4757,23 @@ qla2x00_rport_del(void *data)
        }
 }
 
+void qla2x00_set_fcport_state(fc_port_t *fcport, int state)
+{
+       int old_state;
+
+       old_state = atomic_read(&fcport->state);
+       atomic_set(&fcport->state, state);
+
+       /* Don't print state transitions during initial allocation of fcport */
+       if (old_state && old_state != state) {
+               ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
+                      "FCPort %8phC state transitioned from %s to %s - portid=%02x%02x%02x.\n",
+                      fcport->port_name, port_state_str[old_state],
+                      port_state_str[state], fcport->d_id.b.domain,
+                      fcport->d_id.b.area, fcport->d_id.b.al_pa);
+       }
+}
+
 /**
  * qla2x00_alloc_fcport() - Allocate a generic fcport.
  * @vha: HA context
index 07c3f45d4bd7cc3f2b6cdcaef76ed433f3714dcc..7a67169d94a200666f46f361a14313f0fc50c056 100644 (file)
@@ -142,25 +142,6 @@ qla2x00_clean_dsd_pool(struct qla_hw_data *ha, struct crc_context *ctx)
        INIT_LIST_HEAD(&ctx->dsd_list);
 }
 
-static inline void
-qla2x00_set_fcport_state(fc_port_t *fcport, int state)
-{
-       int old_state;
-
-       old_state = atomic_read(&fcport->state);
-       atomic_set(&fcport->state, state);
-
-       /* Don't print state transitions during initial allocation of fcport */
-       if (old_state && old_state != state) {
-               ql_dbg(ql_dbg_disc, fcport->vha, 0x207d,
-                   "FCPort %8phC state transitioned from %s to %s - "
-                       "portid=%02x%02x%02x.\n", fcport->port_name,
-                   port_state_str[old_state], port_state_str[state],
-                   fcport->d_id.b.domain, fcport->d_id.b.area,
-                   fcport->d_id.b.al_pa);
-       }
-}
-
 static inline int
 qla2x00_hba_err_chk_enabled(srb_t *sp)
 {