Commit c02ee1e5 authored by Bart Van Assche's avatar Bart Van Assche Committed by Martin K. Petersen

scsi: qla2xxx: Change a stack variable into a static const variable

Make qla2x00_get_host_fabric_name() slightly faster by changing a stack
array into a static array. Declare that array const now that the
wwn_to_u64() argument pointer has been declared const.

Cc: Himanshu Madhani <hmadhani@marvell.com>
Cc: Giridhar Malavali <gmalavali@marvell.com>
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
Acked-by: default avatarHimanshu Madhani <hmadhani@marvell.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 5585cbdd
...@@ -2723,8 +2723,9 @@ static void ...@@ -2723,8 +2723,9 @@ static void
qla2x00_get_host_fabric_name(struct Scsi_Host *shost) qla2x00_get_host_fabric_name(struct Scsi_Host *shost)
{ {
scsi_qla_host_t *vha = shost_priv(shost); scsi_qla_host_t *vha = shost_priv(shost);
uint8_t node_name[WWN_SIZE] = { 0xFF, 0xFF, 0xFF, 0xFF, \ static const uint8_t node_name[WWN_SIZE] = {
0xFF, 0xFF, 0xFF, 0xFF}; 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF
};
u64 fabric_name = wwn_to_u64(node_name); u64 fabric_name = wwn_to_u64(node_name);
if (vha->device_flags & SWITCH_FOUND) if (vha->device_flags & SWITCH_FOUND)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment