53c700: Use proper debug printk format specifiers
authorHelge Deller <deller@gmx.de>
Fri, 10 Jun 2016 20:39:45 +0000 (22:39 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 13 Jul 2016 03:16:31 +0000 (23:16 -0400)
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>
drivers/scsi/53c700.c
drivers/scsi/53c700.h

index 3ddc85e6efd65c845fa3a306c832ad2b1a48ac1d..55562019acf81578b227f9380b3fe4dbb9222b94 100644 (file)
@@ -1892,7 +1892,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, void (*done)(struct scsi_cmnd *)
                slot->SG[i].ins = bS_to_host(SCRIPT_RETURN);
                slot->SG[i].pAddr = 0;
                dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEVICE);
-               DEBUG((" SETTING %08lx to %x\n",
+               DEBUG((" SETTING %p to %x\n",
                       (&slot->pSG[i].ins),
                       slot->SG[i].ins));
        }
index e06bdfeab420013f4655251623a3d6b6f5e56f9b..c893a5d3ff8d99488f44a984d1db88de5ee85615 100644 (file)
@@ -423,23 +423,25 @@ struct NCR_700_Host_Parameters {
 #define script_patch_32(dev, script, symbol, value) \
 { \
        int i; \
+       dma_addr_t da = value; \
        for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
-               __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \
+               __u32 val = bS_to_cpu((script)[A_##symbol##_used[i]]) + da; \
                (script)[A_##symbol##_used[i]] = bS_to_host(val); \
                dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
-               DEBUG((" script, patching %s at %d to 0x%lx\n", \
-                      #symbol, A_##symbol##_used[i], (value))); \
+               DEBUG((" script, patching %s at %d to %pad\n", \
+                      #symbol, A_##symbol##_used[i], &da)); \
        } \
 }
 
 #define script_patch_32_abs(dev, script, symbol, value) \
 { \
        int i; \
+       dma_addr_t da = value; \
        for(i=0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
-               (script)[A_##symbol##_used[i]] = bS_to_host(value); \
+               (script)[A_##symbol##_used[i]] = bS_to_host(da); \
                dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEVICE); \
-               DEBUG((" script, patching %s at %d to 0x%lx\n", \
-                      #symbol, A_##symbol##_used[i], (value))); \
+               DEBUG((" script, patching %s at %d to %pad\n", \
+                      #symbol, A_##symbol##_used[i], &da)); \
        } \
 }