]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: lpfc: Move trunk_errmsg[] from a header file into a .c file
authorBart Van Assche <bvanassche@acm.org>
Thu, 28 Mar 2019 18:06:19 +0000 (11:06 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Thu, 4 Apr 2019 03:11:36 +0000 (23:11 -0400)
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>
drivers/scsi/lpfc/lpfc_attr.c
drivers/scsi/lpfc/lpfc_hw4.h

index 7259cd0532bc7287cbf824d29d06a68f9d43c639..e9adb3f1961d86967c53d82c3149a0693ac4fbb0 100644 (file)
 #define LPFC_REG_WRITE_KEY_SIZE        4
 #define LPFC_REG_WRITE_KEY     "EMLX"
 
+const char *const trunk_errmsg[] = {   /* map errcode */
+       "",     /* There is no such error code at index 0*/
+       "link negotiated speed does not match existing"
+               " trunk - link was \"low\" speed",
+       "link negotiated speed does not match"
+               " existing trunk - link was \"middle\" speed",
+       "link negotiated speed does not match existing"
+               " trunk - link was \"high\" speed",
+       "Attached to non-trunking port - F_Port",
+       "Attached to non-trunking port - N_Port",
+       "FLOGI response timeout",
+       "non-FLOGI frame received",
+       "Invalid FLOGI response",
+       "Trunking initialization protocol",
+       "Trunk peer device mismatch",
+};
+
 /**
  * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules
  * @incr: integer to convert.
index 3b5988669b54baf33f3c7b5bfd0bce18b900b2cd..77f9a55a3f54422549bfb89945f9988930c26a09 100644 (file)
@@ -4084,22 +4084,7 @@ struct lpfc_acqe_grp5 {
        uint32_t trailer;
 };
 
-static char *const trunk_errmsg[] = {  /* map errcode */
-       "",     /* There is no such error code at index 0*/
-       "link negotiated speed does not match existing"
-               " trunk - link was \"low\" speed",
-       "link negotiated speed does not match"
-               " existing trunk - link was \"middle\" speed",
-       "link negotiated speed does not match existing"
-               " trunk - link was \"high\" speed",
-       "Attached to non-trunking port - F_Port",
-       "Attached to non-trunking port - N_Port",
-       "FLOGI response timeout",
-       "non-FLOGI frame received",
-       "Invalid FLOGI response",
-       "Trunking initialization protocol",
-       "Trunk peer device mismatch",
-};
+extern const char *const trunk_errmsg[];
 
 struct lpfc_acqe_fc_la {
        uint32_t word0;