sata_fsl: Fix compile warnings
PATCH 1/1 sata_fsl: Fix compile warnings
We we build with dma_addr_t as a 64-bit quantity we get:
drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':drivers/ata/sata_fsl.c:340: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'dma_addr_t'
Signed-off-by Kumar Gala <[email protected]>
--- drivers/ata/sata_fsl.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
drivers/ata/sata_fsl.c +4 -3
@@ -332,13 +332,14 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,dma_addr_t sg_addr =sg_dma_address (sg);u32 sg_len =sg_dma_len (sg); -VPRINTK ("SATA FSL : fill_sg, sg_addr = 0x%x, sg_len = %d\n" , - sg_addr, sg_len); +VPRINTK ("SATA FSL : fill_sg, sg_addr = 0x%llx, sg_len = %d\n" , + (unsigned long long )sg_addr, sg_len);/* warn if each s/g element is not dword aligned */ if (sg_addr &0x03 )ata_port_printk (qc->ap,KERN_ERR , -"s/g addr unaligned : 0x%x\n" , sg_addr); +"s/g addr unaligned : 0x%llxx\n" , + (unsigned long long )sg_addr);if (sg_len &0x03 )ata_port_printk (qc->ap,KERN_ERR ,"s/g len unaligned : 0x%x\n" , sg_len);
Signature · 1 line
1.6.0.6
Quoted 19 lines · Kumar Gala
We we build with
dma_addr_tas a 64-bit quantity we get:
drivers/ata/sata_fsl.c: In function 'sata_fsl_fill_sg':drivers/ata/sata_fsl.c:340: warning: format '%x' expects type 'unsigned int', but argument 4 has type 'dma_addr_t'Signed-off-by Kumar Gala <[email protected]>---
drivers/ata/sata_fsl.c| 7 ++++---1 files changed, 4 insertions(+), 3 deletions(-)drivers/ata/sata_fsl.c +0
-0@@ -332,13 +332,14 @@ static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc, dma_addr_t sg_addr = sg_dma_address(sg);u32 sg_len =sg_dma_len (sg);
drivers/ata/sata_fsl.c static unsigned int sata_fsl_fill_sg(struct · line 342
Quoted 10 lines
drivers/ata/sata_fsl.c +3
-3-VPRINTK ("SATA FSL : fill_sg, sg_addr = 0x%x, sg_len = %d\n" , - sg_addr, sg_len); +VPRINTK ("SATA FSL : fill_sg, sg_addr = 0x%llx, sg_len = %d\n" , + (unsigned long long )sg_addr, sg_len);/* warn if each s/g element is not dword aligned */ if (sg_addr &0x03 ) ata_port_printk(qc->ap, KERN_ERR, -"s/g addr unaligned : 0x%x\n" , sg_addr); + "s/g addr unaligned : 0x%llxx\n",
You have an extra "x" in there....
Cheers,
B