Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Bart Van Assche and committed by
Martin K. Petersen
a73cb814 cd05c155

+18 -16
+17
drivers/scsi/lpfc/lpfc_attr.c
··· 71 71 #define LPFC_REG_WRITE_KEY_SIZE 4 72 72 #define LPFC_REG_WRITE_KEY "EMLX" 73 73 74 + const 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 92 * lpfc_jedec_to_ascii - Hex to ascii convertor according to JEDEC rules 76 93 * @incr: integer to convert.
+1 -16
drivers/scsi/lpfc/lpfc_hw4.h
··· 4084 4084 uint32_t trailer; 4085 4085 }; 4086 4086 4087 - static char *const trunk_errmsg[] = { /* map errcode */ 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 - }; 4087 + extern const char *const trunk_errmsg[]; 4103 4088 4104 4089 struct lpfc_acqe_fc_la { 4105 4090 uint32_t word0;