diff options
author | Chad Dupuis <chad.dupuis@qlogic.com> | 2014-03-13 14:16:40 -0400 |
---|---|---|
committer | James Bottomley <JBottomley@Parallels.com> | 2014-03-19 18:10:20 -0400 |
commit | 97ea702bacf8ffb0b27448a46a7a66bfd9004202 (patch) | |
tree | 8b724e8b93b0d8f1e1601dc32e81cc8c4cd3b05f /drivers/scsi | |
parent | b367dcaa512922e9207160bef0895622cfae4c9f (diff) |
[SCSI] qla2xxx: Fix build errors related to invalid print fields on some architectures.
Fixes some build warnings such as:
drivers/scsi/qla2xxx/qla_attr.c:162:6: warning: format '%lx' expects argument of
type 'long unsigned int', but argument 6 has type 'size_t'"
and
drivers/scsi/qla2xxx/qla_init.c:5198:7: warning: format '%lx' expects argument
of type 'long unsigned int', but argument 5 has type 'uint32_t' [-Wformat]
Signed-off-by: Chad Dupuis <chad.dupuis@qlogic.com>
Signed-off-by: Saurav Kashyap <saurav.kashyap@qlogic.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_attr.c | 6 | ||||
-rw-r--r-- | drivers/scsi/qla2xxx/qla_init.c | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index aa81829aeb3a..07befcf365b8 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -159,7 +159,7 @@ qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj, | |||
159 | return 0; | 159 | return 0; |
160 | 160 | ||
161 | ql_dbg(ql_dbg_user, vha, 0x70e2, | 161 | ql_dbg(ql_dbg_user, vha, 0x70e2, |
162 | "chunk <- off=%llx count=%lx\n", off, count); | 162 | "chunk <- off=%llx count=%zx\n", off, count); |
163 | return memory_read_from_buffer(buf, count, &off, | 163 | return memory_read_from_buffer(buf, count, &off, |
164 | ha->fw_dump_template, ha->fw_dump_template_len); | 164 | ha->fw_dump_template, ha->fw_dump_template_len); |
165 | } | 165 | } |
@@ -200,11 +200,11 @@ qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj, | |||
200 | if (off + count > ha->fw_dump_template_len) { | 200 | if (off + count > ha->fw_dump_template_len) { |
201 | count = ha->fw_dump_template_len - off; | 201 | count = ha->fw_dump_template_len - off; |
202 | ql_dbg(ql_dbg_user, vha, 0x70d3, | 202 | ql_dbg(ql_dbg_user, vha, 0x70d3, |
203 | "chunk -> truncating to %lx bytes.\n", count); | 203 | "chunk -> truncating to %zx bytes.\n", count); |
204 | } | 204 | } |
205 | 205 | ||
206 | ql_dbg(ql_dbg_user, vha, 0x70d4, | 206 | ql_dbg(ql_dbg_user, vha, 0x70d4, |
207 | "chunk -> off=%llx count=%lx\n", off, count); | 207 | "chunk -> off=%llx count=%zx\n", off, count); |
208 | memcpy(ha->fw_dump_template + off, buf, count); | 208 | memcpy(ha->fw_dump_template + off, buf, count); |
209 | 209 | ||
210 | if (off + count == ha->fw_dump_template_len) { | 210 | if (off + count == ha->fw_dump_template_len) { |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 0a25e8bd8729..38aeb54cd9d8 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -5291,8 +5291,8 @@ qla24xx_load_risc_flash(scsi_qla_host_t *vha, uint32_t *srisc_addr, | |||
5291 | "-> template size %x bytes\n", dlen); | 5291 | "-> template size %x bytes\n", dlen); |
5292 | if (dlen > risc_size * sizeof(*dcode)) { | 5292 | if (dlen > risc_size * sizeof(*dcode)) { |
5293 | ql_log(ql_log_warn, vha, 0x0167, | 5293 | ql_log(ql_log_warn, vha, 0x0167, |
5294 | "Failed fwdump template exceeds array by %lx bytes\n", | 5294 | "Failed fwdump template exceeds array by %x bytes\n", |
5295 | dlen - risc_size * sizeof(*dcode)); | 5295 | (uint32_t)(dlen - risc_size * sizeof(*dcode))); |
5296 | goto default_template; | 5296 | goto default_template; |
5297 | } | 5297 | } |
5298 | ha->fw_dump_template_len = dlen; | 5298 | ha->fw_dump_template_len = dlen; |
@@ -5558,8 +5558,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5558 | ha->fw_dump_template_len = 0; | 5558 | ha->fw_dump_template_len = 0; |
5559 | 5559 | ||
5560 | ql_dbg(ql_dbg_init, vha, 0x171, | 5560 | ql_dbg(ql_dbg_init, vha, 0x171, |
5561 | "Loading fwdump template from %lx\n", | 5561 | "Loading fwdump template from %x\n", |
5562 | (void *)fwcode - (void *)blob->fw->data); | 5562 | (uint32_t)((void *)fwcode - (void *)blob->fw->data)); |
5563 | risc_size = be32_to_cpu(fwcode[2]); | 5563 | risc_size = be32_to_cpu(fwcode[2]); |
5564 | ql_dbg(ql_dbg_init, vha, 0x172, | 5564 | ql_dbg(ql_dbg_init, vha, 0x172, |
5565 | "-> array size %x dwords\n", risc_size); | 5565 | "-> array size %x dwords\n", risc_size); |
@@ -5593,8 +5593,8 @@ qla24xx_load_risc_blob(scsi_qla_host_t *vha, uint32_t *srisc_addr) | |||
5593 | "-> template size %x bytes\n", dlen); | 5593 | "-> template size %x bytes\n", dlen); |
5594 | if (dlen > risc_size * sizeof(*fwcode)) { | 5594 | if (dlen > risc_size * sizeof(*fwcode)) { |
5595 | ql_log(ql_log_warn, vha, 0x0177, | 5595 | ql_log(ql_log_warn, vha, 0x0177, |
5596 | "Failed fwdump template exceeds array by %lx bytes\n", | 5596 | "Failed fwdump template exceeds array by %x bytes\n", |
5597 | dlen - risc_size * sizeof(*fwcode)); | 5597 | (uint32_t)(dlen - risc_size * sizeof(*fwcode))); |
5598 | goto default_template; | 5598 | goto default_template; |
5599 | } | 5599 | } |
5600 | ha->fw_dump_template_len = dlen; | 5600 | ha->fw_dump_template_len = dlen; |