summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2019-03-28 14:06:19 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2019-04-03 23:11:36 -0400
commita73cb814923ab948fae64e34802cebe228228a88 (patch)
treebc3e2568f1be536e5b8f765845c050aa72435fcc
parentcd05c155d720f9a499c0796aecb58397dfa8618d (diff)
scsi: lpfc: Move trunk_errmsg[] from a header file into a .c file
Arrays should be defined in .c files instead of in a header file. This patch reduces the size of the lpfc kernel module. Cc: James Smart <james.smart@broadcom.com> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Acked-by: James Smart <james.smart@broadcom.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r--drivers/scsi/lpfc/lpfc_attr.c17
-rw-r--r--drivers/scsi/lpfc/lpfc_hw4.h17
2 files changed, 18 insertions, 16 deletions
diff --git a/drivers/scsi/lpfc/lpfc_attr.c b/drivers/scsi/lpfc/lpfc_attr.c
index 7259cd0532bc..e9adb3f1961d 100644
--- a/drivers/scsi/lpfc/lpfc_attr.c
+++ b/drivers/scsi/lpfc/lpfc_attr.c
@@ -71,6 +71,23 @@
71#define LPFC_REG_WRITE_KEY_SIZE 4 71#define LPFC_REG_WRITE_KEY_SIZE 4
72#define LPFC_REG_WRITE_KEY "EMLX" 72#define LPFC_REG_WRITE_KEY "EMLX"
73 73
74const char *const trunk_errmsg[] = { /* map errcode */
75 "", /* There is no such error code at index 0*/
76 "link negotiated speed does not match existing"
77 " trunk - link was \"low\" speed",
78 "link negotiated speed does not match"
79 " existing trunk - link was \"middle\" speed",
80 "link negotiated speed does not match existing"
81 " trunk - link was \"high\" speed",
82 "Attached to non-trunking port - F_Port",
83 "Attached to non-trunking port - N_Port",
84 "FLOGI response timeout",
85 "non-FLOGI frame received",
86 "Invalid FLOGI response",
87 "Trunking initialization protocol",
88 "Trunk peer device mismatch",
89};
90
74/** 91/**
75 * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules 92 * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules
76 * @incr: integer to convert. 93 * @incr: integer to convert.
diff --git a/drivers/scsi/lpfc/lpfc_hw4.h b/drivers/scsi/lpfc/lpfc_hw4.h
index 3b5988669b54..77f9a55a3f54 100644
--- a/drivers/scsi/lpfc/lpfc_hw4.h
+++ b/drivers/scsi/lpfc/lpfc_hw4.h
@@ -4084,22 +4084,7 @@ struct lpfc_acqe_grp5 {
4084 uint32_t trailer; 4084 uint32_t trailer;
4085}; 4085};
4086 4086
4087static char *const trunk_errmsg[] = { /* map errcode */ 4087extern const char *const trunk_errmsg[];
4088 "", /* There is no such error code at index 0*/
4089 "link negotiated speed does not match existing"
4090 " trunk - link was \"low\" speed",
4091 "link negotiated speed does not match"
4092 " existing trunk - link was \"middle\" speed",
4093 "link negotiated speed does not match existing"
4094 " trunk - link was \"high\" speed",
4095 "Attached to non-trunking port - F_Port",
4096 "Attached to non-trunking port - N_Port",
4097 "FLOGI response timeout",
4098 "non-FLOGI frame received",
4099 "Invalid FLOGI response",
4100 "Trunking initialization protocol",
4101 "Trunk peer device mismatch",
4102};
4103 4088
4104struct lpfc_acqe_fc_la { 4089struct lpfc_acqe_fc_la {
4105 uint32_t word0; 4090 uint32_t word0;