Commit 93734809 authored by Andrew Morton's avatar Andrew Morton Committed by James Bottomley

[PATCH] Fix qla2xxx warnings

On ppc64:

drivers/scsi/qla2xxx/qla_dbg.c: In function `qla2300_fw_dump':
drivers/scsi/qla2xxx/qla_dbg.c:64: warning: int format, different type arg (arg 5)
drivers/scsi/qla2xxx/qla_dbg.c: In function `qla2100_fw_dump':
drivers/scsi/qla2xxx/qla_dbg.c:600: warning: int format, different type arg (arg 5)
drivers/scsi/qla2xxx/qla_os.c: In function `qla2x00_proc_info':
drivers/scsi/qla2xxx/qla_os.c:2386: warning: cast to pointer from integer of different size
drivers/scsi/qla2xxx/qla_os.c:2386: warning: cast to pointer from integer of different size

The qla_dbg() warning occurs because on ppc64 size_t is a long.  sizeof
returns a size_t.

I used %Z rather than the more modern %z, because gcc-2.95 warns about %z.
printk supports both.

For printing out dma_addr_t's, we really don't know what size they are here,
so treating them as unsigned long long is best.
parent 2040078e
......@@ -62,7 +62,7 @@ qla2300_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
ha->fw_dump_order);
if (ha->fw_dump == NULL) {
qla_printk(KERN_WARNING, ha,
"Unable to allocated memory for firmware dump (%d/%d).\n",
"Unable to allocated memory for firmware dump (%d/%Zd).\n",
ha->fw_dump_order, sizeof(struct qla2300_fw_dump));
return;
}
......@@ -598,7 +598,7 @@ qla2100_fw_dump(scsi_qla_host_t *ha, int hardware_locked)
ha->fw_dump_order);
if (ha->fw_dump == NULL) {
qla_printk(KERN_WARNING, ha,
"Unable to allocated memory for firmware dump (%d/%d).\n",
"Unable to allocated memory for firmware dump (%d/%Zd).\n",
ha->fw_dump_order, sizeof(struct qla2100_fw_dump));
return;
}
......
......@@ -2382,8 +2382,9 @@ qla2x00_proc_info(struct Scsi_Host *shost, char *buffer,
ha->brd_info->isp_name, ('A' + tmp_sn/100000), (tmp_sn%100000));
copy_info(&info,
"Request Queue = 0x%p, Response Queue = 0x%p\n",
(void *)ha->request_dma, (void *)ha->response_dma);
"Request Queue = 0x%llx, Response Queue = 0x%llx\n",
(unsigned long long)ha->request_dma,
(unsigned long long)ha->response_dma);
copy_info(&info,
"Request Queue count = %ld, Response Queue count = %ld\n",
......
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