diff options
author | Oleksandr Khoshaba <Oleksandr.Khoshaba@gmail.com> | 2013-08-27 01:37:27 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2013-09-03 10:27:59 -0400 |
commit | 7b8335589035b47504f98c1a22547f514386a48c (patch) | |
tree | d9402732b416364611d468311df9d6cb7f37d501 /drivers/scsi/qla2xxx/qla_init.c | |
parent | 963ba22b90a955363644cd397b20226928eab976 (diff) |
[SCSI] qla2xxx: Print some variables to hexadecimal string via %*phN format
The patch changes a specifier used to output some variables. Instead of using
stack for each byte the '%*ph[CN]' allows to take a one pointer and prints
entire buffer as a hexadecimal string with the separator ':' or ''.
Signed-off-by: Oleksandr Khoshaba <Oleksandr.Khoshaba@gmail.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index f2216ed2ad8c..d60e2c1ac442 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -564,12 +564,7 @@ qla2x00_initialize_adapter(scsi_qla_host_t *vha) | |||
564 | if (ha->flags.disable_serdes) { | 564 | if (ha->flags.disable_serdes) { |
565 | /* Mask HBA via NVRAM settings? */ | 565 | /* Mask HBA via NVRAM settings? */ |
566 | ql_log(ql_log_info, vha, 0x0077, | 566 | ql_log(ql_log_info, vha, 0x0077, |
567 | "Masking HBA WWPN " | 567 | "Masking HBA WWPN %8phN (via NVRAM).\n", vha->port_name); |
568 | "%02x%02x%02x%02x%02x%02x%02x%02x (via NVRAM).\n", | ||
569 | vha->port_name[0], vha->port_name[1], | ||
570 | vha->port_name[2], vha->port_name[3], | ||
571 | vha->port_name[4], vha->port_name[5], | ||
572 | vha->port_name[6], vha->port_name[7]); | ||
573 | return QLA_FUNCTION_FAILED; | 568 | return QLA_FUNCTION_FAILED; |
574 | } | 569 | } |
575 | 570 | ||
@@ -3061,22 +3056,13 @@ qla2x00_iidma_fcport(scsi_qla_host_t *vha, fc_port_t *fcport) | |||
3061 | mb); | 3056 | mb); |
3062 | if (rval != QLA_SUCCESS) { | 3057 | if (rval != QLA_SUCCESS) { |
3063 | ql_dbg(ql_dbg_disc, vha, 0x2004, | 3058 | ql_dbg(ql_dbg_disc, vha, 0x2004, |
3064 | "Unable to adjust iIDMA " | 3059 | "Unable to adjust iIDMA %8phN -- %04x %x %04x %04x.\n", |
3065 | "%02x%02x%02x%02x%02x%02x%02x%02x -- %04x %x %04x " | 3060 | fcport->port_name, rval, fcport->fp_speed, mb[0], mb[1]); |
3066 | "%04x.\n", fcport->port_name[0], fcport->port_name[1], | ||
3067 | fcport->port_name[2], fcport->port_name[3], | ||
3068 | fcport->port_name[4], fcport->port_name[5], | ||
3069 | fcport->port_name[6], fcport->port_name[7], rval, | ||
3070 | fcport->fp_speed, mb[0], mb[1]); | ||
3071 | } else { | 3061 | } else { |
3072 | ql_dbg(ql_dbg_disc, vha, 0x2005, | 3062 | ql_dbg(ql_dbg_disc, vha, 0x2005, |
3073 | "iIDMA adjusted to %s GB/s " | 3063 | "iIDMA adjusted to %s GB/s on %8phN.\n", |
3074 | "on %02x%02x%02x%02x%02x%02x%02x%02x.\n", | ||
3075 | qla2x00_get_link_speed_str(ha, fcport->fp_speed), | 3064 | qla2x00_get_link_speed_str(ha, fcport->fp_speed), |
3076 | fcport->port_name[0], fcport->port_name[1], | 3065 | fcport->port_name); |
3077 | fcport->port_name[2], fcport->port_name[3], | ||
3078 | fcport->port_name[4], fcport->port_name[5], | ||
3079 | fcport->port_name[6], fcport->port_name[7]); | ||
3080 | } | 3066 | } |
3081 | } | 3067 | } |
3082 | 3068 | ||