Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1607171 > unrolled thread

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

Started byCyril Bur <cyrilbur@gmail.com>
First post2017-03-23 05:40 +0100
Last post2017-03-23 05:40 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] drivers/misc: Aspeed LPC control fix format string warning Cyril Bur <cyrilbur@gmail.com> - 2017-03-23 05:40 +0100

#1607171 — [PATCH] drivers/misc: Aspeed LPC control fix format string warning

FromCyril Bur <cyrilbur@gmail.com>
Date2017-03-23 05:40 +0100
Subject[PATCH] drivers/misc: Aspeed LPC control fix format string warning
Message-ID<to2Hv-5vP-1@gated-at.bofh.it>
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",

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Cyril Bur <cyrilbur@gmail.com>
---
 drivers/misc/aspeed-lpc-ctrl.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/misc/aspeed-lpc-ctrl.c b/drivers/misc/aspeed-lpc-ctrl.c
index c654651a7b6d..2f6bb2244be5 100644
--- a/drivers/misc/aspeed-lpc-ctrl.c
+++ b/drivers/misc/aspeed-lpc-ctrl.c
@@ -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;
 }
-- 
2.12.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web