Skip to contentSkip to conversation

drivers/misc: aspeed-lpc-ctrl: fix printk format warning again

PATCH New Arnd Bergmann 1 participant 1 message Mar 23, 2017

Subsystems (2)
lore
Share & tools
lore

Arnd Bergmann

author maintainer
#0 lore raw

PATCH 1/1 drivers/misc: aspeed-lpc-ctrl: fix printk format warning again

The format string is still broken after the first attempt to fix it:

drivers/misc/aspeed-lpc-ctrl.c: In function 'aspeed_lpc_ctrl_probe':
drivers/misc/aspeed-lpc-ctrl.c:232:17: error: format '%x' expects argument of type 'unsigned int', but argument 4 has type 'resource_size_t {aka long long unsigned int}' [-Werror=format=]

We can actually just print the resource structure directly here.

Fixes 132c93d4215c ("drivers/misc: Aspeed LPC control fix compile error and warning")
---
 drivers/misc/aspeed-lpc-ctrl.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/misc/aspeed-lpc-ctrl.c +1 -2
index c654651a7b6d..b5439643f54b 100644
@@ -229,8 +229,7 @@ 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 %pr\n", &resm);
 
 	return rc;
 }
Signature · 1 line
2.9.0