diff options
author | Helge Deller <deller@gmx.de> | 2016-06-10 16:39:45 -0400 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2016-07-12 23:16:31 -0400 |
commit | 0da21c4417ce8fac70bb46dd58c3a63f64bad76c (patch) | |
tree | 4dd5763b4cba7d6387a670c50c5924840454b25c | |
parent | 29374ec6e2160290e758a3cac1d2d81dd9613f4a (diff) |
53c700: Use proper debug printk format specifiers
When enabling the debug options NCR_700_DEBUG and NCR_700_TAG_DEBUG
various printk format warnings can be seen like:
drivers/scsi/53c700.c:357:2: warning: format %p expects argument of type void * , but argument 4 has type dma_addr_t [-Wformat=]
script_patch_32(hostdata->dev, script, MessageLocation,
Fix them by using the right printk format specifiers.
Signed-off-by: Helge Deller <deller@gmx.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
-rw-r--r-- | drivers/scsi/53c700.c | 2 | ||||
-rw-r--r-- | drivers/scsi/53c700.h | 14 |
2 files changed, 9 insertions, 7 deletions
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c index 3ddc85e6efd6..55562019acf8 100644 --- a/drivers/scsi/53c700.c +++ b/drivers/scsi/53c700.c | |||
@@ -1892,7 +1892,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *) | |||
1892 | slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); | 1892 | slot->SG[i].ins = bS_to_host(SCRIPT_RETURN); |
1893 | slot->SG[i].pAddr = 0; | 1893 | slot->SG[i].pAddr = 0; |
1894 | dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); | 1894 | dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE); |
1895 | DEBUG((" SETTING %08lx to %x\n", | 1895 | DEBUG((" SETTING %p to %x\n", |
1896 | (&slot->pSG[i].ins), | 1896 | (&slot->pSG[i].ins), |
1897 | slot->SG[i].ins)); | 1897 | slot->SG[i].ins)); |
1898 | } | 1898 | } |
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h index e06bdfeab420..c893a5d3ff8d 100644 --- a/drivers/scsi/53c700.h +++ b/drivers/scsi/53c700.h | |||
@@ -423,23 +423,25 @@ struct NCR_700_Host_Parameters { | |||
423 | #define script_patch_32(dev, script, symbol, value) \ | 423 | #define script_patch_32(dev, script, symbol, value) \ |
424 | { \ | 424 | { \ |
425 | int i; \ | 425 | int i; \ |
426 | dma_addr_t da = value; \ | ||
426 | for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ | 427 | for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ |
427 | __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \ | 428 | __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + da; \ |
428 | (script)[A_##symbol##_used[i]] = bS_to_host(val); \ | 429 | (script)[A_##symbol##_used[i]] = bS_to_host(val); \ |
429 | dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ | 430 | dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ |
430 | DEBUG((" script, patching %s at %d to 0x%lx\n", \ | 431 | DEBUG((" script, patching %s at %d to %pad\n", \ |
431 | #symbol, A_##symbol##_used[i], (value))); \ | 432 | #symbol, A_##symbol##_used[i], &da)); \ |
432 | } \ | 433 | } \ |
433 | } | 434 | } |
434 | 435 | ||
435 | #define script_patch_32_abs(dev, script, symbol, value) \ | 436 | #define script_patch_32_abs(dev, script, symbol, value) \ |
436 | { \ | 437 | { \ |
437 | int i; \ | 438 | int i; \ |
439 | dma_addr_t da = value; \ | ||
438 | for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ | 440 | for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \ |
439 | (script)[A_##symbol##_used[i]] = bS_to_host(value); \ | 441 | (script)[A_##symbol##_used[i]] = bS_to_host(da); \ |
440 | dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ | 442 | dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \ |
441 | DEBUG((" script, patching %s at %d to 0x%lx\n", \ | 443 | DEBUG((" script, patching %s at %d to %pad\n", \ |
442 | #symbol, A_##symbol##_used[i], (value))); \ | 444 | #symbol, A_##symbol##_used[i], &da)); \ |
443 | } \ | 445 | } \ |
444 | } | 446 | } |
445 | 447 | ||