diff mbox

[RFC,015/111] staging: etnaviv: fix printk formats

Message ID 1427988653-754-16-git-send-email-l.stach@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Lucas Stach April 2, 2015, 3:29 p.m. UTC
From: Russell King <rmk+kernel@arm.linux.org.uk>

Use %p for pointers rather than casting to u32 and using 0x%08x.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
---
 drivers/staging/etnaviv/etnaviv_drv.c | 4 ++--
 drivers/staging/etnaviv/etnaviv_gpu.c | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/drivers/staging/etnaviv/etnaviv_drv.c b/drivers/staging/etnaviv/etnaviv_drv.c
index cc860b63447f..863f9d6a0174 100644
--- a/drivers/staging/etnaviv/etnaviv_drv.c
+++ b/drivers/staging/etnaviv/etnaviv_drv.c
@@ -69,7 +69,7 @@  void __iomem *etnaviv_ioremap(struct platform_device *pdev, const char *name,
 void etnaviv_writel(u32 data, void __iomem *addr)
 {
 	if (reglog)
-		printk(KERN_DEBUG "IO:W %08x %08x\n", (u32)addr, data);
+		printk(KERN_DEBUG "IO:W %p %08x\n", addr, data);
 	writel(data, addr);
 }
 
@@ -77,7 +77,7 @@  u32 etnaviv_readl(const void __iomem *addr)
 {
 	u32 val = readl(addr);
 	if (reglog)
-		printk(KERN_ERR "IO:R %08x %08x\n", (u32)addr, val);
+		printk(KERN_DEBUG "IO:R %p %08x\n", addr, val);
 	return val;
 }
 
diff --git a/drivers/staging/etnaviv/etnaviv_gpu.c b/drivers/staging/etnaviv/etnaviv_gpu.c
index 859edcccdda6..d06665aa319b 100644
--- a/drivers/staging/etnaviv/etnaviv_gpu.c
+++ b/drivers/staging/etnaviv/etnaviv_gpu.c
@@ -852,9 +852,9 @@  static int etnaviv_gpu_bind(struct device *dev, struct device *master,
 	struct etnaviv_gpu *gpu = dev_get_drvdata(dev);
 	int idx = gpu->pipe;
 
-	dev_info(dev, "pre gpu[idx]: 0x%08x\n", (u32)priv->gpu[idx]);
+	dev_info(dev, "pre gpu[idx]: %p\n", priv->gpu[idx]);
 
-	if (priv->gpu[idx] == 0) {
+	if (priv->gpu[idx] == NULL) {
 		dev_info(dev, "adding core @idx %d\n", idx);
 		priv->gpu[idx] = gpu;
 	} else {
@@ -862,7 +862,7 @@  static int etnaviv_gpu_bind(struct device *dev, struct device *master,
 		goto fail;
 	}
 
-	dev_info(dev, "post gpu[idx]: 0x%08x\n", (u32)priv->gpu[idx]);
+	dev_info(dev, "post gpu[idx]: %p\n", priv->gpu[idx]);
 
 	gpu->dev = drm;