scsi: qla2xxx: Move the port_state_str[] definition from a .h to a .c file
authorBart Van Assche <bvanassche@acm.org>
Thu, 11 Apr 2019 21:53:20 +0000 (14:53 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 16 Apr 2019 02:04:40 +0000 (22:04 -0400)
Reduce the size of the qla2xxx kernel module by moving an array 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_def.h
drivers/scsi/qla2xxx/qla_isr.c

index e2c0637962032c063e29e2f94dce380bef05ebc3..c9f0169b21ea86ebaf6a4669b5206c8a4e150da7 100644 (file)
@@ -2472,13 +2472,7 @@ struct event_arg {
 #define FCS_DEVICE_LOST                3
 #define FCS_ONLINE             4
 
-static const char * const port_state_str[] = {
-       "Unknown",
-       "UNCONFIGURED",
-       "DEAD",
-       "LOST",
-       "ONLINE"
-};
+extern const char *const port_state_str[5];
 
 /*
  * FC port flags.
index 9d3211e7de886e0ee1483db755b2ff435671f329..8432ef05f20b1c1de011397dc97847dee03006b3 100644 (file)
@@ -23,6 +23,14 @@ static void qla2x00_status_cont_entry(struct rsp_que *, sts_cont_entry_t *);
 static int qla2x00_error_entry(scsi_qla_host_t *, struct rsp_que *,
        sts_entry_t *);
 
+const char *const port_state_str[] = {
+       "Unknown",
+       "UNCONFIGURED",
+       "DEAD",
+       "LOST",
+       "ONLINE"
+};
+
 /**
  * qla2100_intr_handler() - Process interrupts for the ISP2100 and ISP2200.
  * @irq: interrupt number