Skip to contentSkip to conversation

drivers/misc: Aspeed LPC control fix format string warning

PATCH New Cyril Bur 1 participant 1 message Mar 23, 2017

Subsystems (3)
lore
Share & tools
lore

Cyril Bur

author
#0 lore raw

PATCH 1/1 drivers/misc: Aspeed LPC control fix format string warning

resource_size_t is a derivative of phys_addr_t and should also be printed with %pap:
drivers/misc/aspeed-lpc-ctrl.c:232:17: warning: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Wformat=] dev_info(dev, "Loaded at %pap (0x%08x)\n",

---
 drivers/misc/aspeed-lpc-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/aspeed-lpc-ctrl.c +2 -2
index c654651a7b6d..2f6bb2244be5 100644
@@ -229,8 +229,8 @@ static int aspeed_lpc_ctrl_probe(struct platform_device *pdev)
 	if (rc)
 		dev_err(dev, "Unable to register device\n");
 	else
-		dev_info(dev, "Loaded at %pap (0x%08x)\n",
-			&lpc_ctrl->mem_base, lpc_ctrl->mem_size);
+		dev_info(dev, "Loaded at %pap (%pap)\n",
+			&lpc_ctrl->mem_base, &lpc_ctrl->mem_size);
 
 	return rc;
 }
Signature · 1 line
2.12.1