* [PATCH][SCSI] 53c700: Use proper debug printk format specifiers
@ 2016-06-10 20:39 Helge Deller
2016-06-21 2:02 ` Martin K. Petersen
0 siblings, 1 reply; 2+ messages in thread
From: Helge Deller @ 2016-06-10 20:39 UTC (permalink / raw)
To: James Bottomley, linux-scsi; +Cc: linux-parisc
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 =E2=80=98%p=E2=80=99 expec=
ts argument of type =E2=80=98void *=E2=80=99, but argument 4 has type =E2=
=80=98dma_addr_t=E2=80=99 [-Wformat=3D]
script_patch_32(hostdata->dev, script, MessageLocation,
=46ix them by using the right printk format specifiers.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/drivers/scsi/53c700.c b/drivers/scsi/53c700.c
index d4c2856..56bec27 100644
--- a/drivers/scsi/53c700.c
+++ b/drivers/scsi/53c700.c
@@ -1892,7 +1892,7 @@ NCR_700_queuecommand_lck(struct scsi_cmnd *SCp, v=
oid (*done)(struct scsi_cmnd *)
slot->SG[i].ins =3D bS_to_host(SCRIPT_RETURN);
slot->SG[i].pAddr =3D 0;
dma_cache_sync(hostdata->dev, slot->SG, sizeof(slot->SG), DMA_TO_DEV=
ICE);
- DEBUG((" SETTING %08lx to %x\n",
+ DEBUG((" SETTING %p to %x\n",
(&slot->pSG[i].ins),
slot->SG[i].ins));
}
diff --git a/drivers/scsi/53c700.h b/drivers/scsi/53c700.h
index e06bdfe..fd32971 100644
--- a/drivers/scsi/53c700.h
+++ b/drivers/scsi/53c700.h
@@ -423,23 +423,25 @@ struct NCR_700_Host_Parameters {
#define script_patch_32(dev, script, symbol, value) \
{ \
int i; \
+ dma_addr_t da =3D value; \
for(i=3D0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
- __u32 val =3D bS_to_cpu((script)[A_##symbol##_used[i]]) + value; \
+ __u32 val =3D bS_to_cpu((script)[A_##symbol##_used[i]]) + da; \
(script)[A_##symbol##_used[i]] =3D bS_to_host(val); \
dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEV=
ICE); \
- 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)); \
} \
}
=20
#define script_patch_32_abs(dev, script, symbol, value) \
{ \
int i; \
+ dma_addr_t da =3D value; \
for(i=3D0; i< (sizeof(A_##symbol##_used) / sizeof(__u32)); i++) { \
- (script)[A_##symbol##_used[i]] =3D bS_to_host(value); \
+ (script)[A_##symbol##_used[i]] =3D bS_to_host(da); \
dma_cache_sync((dev), &(script)[A_##symbol##_used[i]], 4, DMA_TO_DEV=
ICE); \
- 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)); \
} \
}
=20
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH][SCSI] 53c700: Use proper debug printk format specifiers
2016-06-10 20:39 [PATCH][SCSI] 53c700: Use proper debug printk format specifiers Helge Deller
@ 2016-06-21 2:02 ` Martin K. Petersen
0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2016-06-21 2:02 UTC (permalink / raw)
To: Helge Deller; +Cc: James Bottomley, linux-scsi, linux-parisc
>>>>> "Helge" =3D=3D Helge Deller <deller@gmx.de> writes:
Helge> When enabling the debug options NCR_700_DEBUG and
Helge> NCR_700_TAG_DEBUG various printk format warnings can be seen
Helge> like: drivers/scsi/53c700.c:357:2: warning: format =E2=80=98%p=E2=
=80=99 expects
Helge> argument of type =E2=80=98void *=E2=80=99, but argument 4 has ty=
pe =E2=80=98dma_addr_t=E2=80=99
Helge> [-Wformat=3D] script_patch_32(hostdata->dev, script,
Helge> MessageLocation,
Helge> Fix them by using the right printk format specifiers.
Applied to 4.8/scsi-queue.
--=20
Martin K. Petersen Oracle Linux Engineering
--
To unsubscribe from this list: send the line "unsubscribe linux-parisc"=
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-06-21 2:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-10 20:39 [PATCH][SCSI] 53c700: Use proper debug printk format specifiers Helge Deller
2016-06-21 2:02 ` Martin K. Petersen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox