Skip to contentSkip to conversation

ata: ftide010: fix resource printing

PATCH Applied Arnd Bergmann 3 participants 3 messages Jun 21, 2017 – Jun 25, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ata: ftide010: fix resource printing

The new driver uses an incorrect format string for resource_size_t:

drivers/ata/pata_ftide010.c: In function 'pata_ftide010_probe':
drivers/ata/pata_ftide010.c:520:17: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]

The nicest way to print the address is to pretty-print the resource using %pR.

Fixes be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")
---
 drivers/ata/pata_ftide010.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/ata/pata_ftide010.c +2 -2
index 7b7e417ba8ba..5d4b72e21161 100644
@@ -517,8 +517,8 @@ static int pata_ftide010_probe(struct platform_device *pdev)
 		ata_sff_std_ports(ioaddr);
 	}
 
-	dev_info(dev, "device ID %08x, irq %d, io base 0x%08x\n",
-		 readl(ftide->base + FTIDE010_IDE_DEVICE_ID), irq, res->start);
+	dev_info(dev, "device ID %08x, irq %d, reg %pR\n",
+		 readl(ftide->base + FTIDE010_IDE_DEVICE_ID), irq, res);
 
 	ret = ata_host_activate(ftide->host, irq, ata_bmdma_interrupt,
 				0, &pata_ftide010_sht);
Signature · 1 line
2.9.0
Applied
#1 lore raw
Quoted 10 lines · Arnd Bergmann

The new driver uses an incorrect format string for resource_size_t:

drivers/ata/pata_ftide010.c: In function 'pata_ftide010_probe':
drivers/ata/pata_ftide010.c:520:17: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]

The nicest way to print the address is to pretty-print the resource using %pR.

Fixes be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")

Applied to libata/for-4.13.

Thanks.

Signature · 1 line
Tejun
Reviewed-by on v1 1/1
#2 lore raw
In reply to Arnd Bergmann
Quoted 10 lines · Arnd Bergmann

The new driver uses an incorrect format string for resource_size_t:

drivers/ata/pata_ftide010.c: In function 'pata_ftide010_probe':
drivers/ata/pata_ftide010.c:520:17: warning: format '%x' expects argument of type 'unsigned int', but argument 5 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=]

The nicest way to print the address is to pretty-print the resource using %pR.

Fixes be4e456ed3a5 ("ata: Add driver for Faraday Technology FTIDE010")

Yours,
Linus Walleij