spi: spi-pl022: Fix warning when CONFIG_ARM_LPAE=y
authorFabio Estevam <fabio.estevam@freescale.com>
Thu, 22 Aug 2013 00:35:37 +0000 (21:35 -0300)
committerMark Brown <broonie@linaro.org>
Thu, 22 Aug 2013 09:46:54 +0000 (10:46 +0100)
When CONFIG_ARM_LPAE=y the following build warning is generated:

drivers/spi/spi-pl022.c:2178:9: warning: format '%x' expects argument of type 'unsigned int', but argument 2 has type 'resource_size_t' [-Wformat]

According to Documentation/printk-formats.txt '%pa' can be used to properly
print 'resource_size_t'.

Reported-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/spi/spi-pl022.c

index abef061fb84af1537afde292373604be6d1e85b1..1871bf3fd389a3da29318b050e7f1581aeea9d82 100644 (file)
@@ -2193,8 +2193,8 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
                status = -ENOMEM;
                goto err_no_ioremap;
        }
-       printk(KERN_INFO "pl022: mapped registers from 0x%08x to %p\n",
-              adev->res.start, pl022->virtbase);
+       printk(KERN_INFO "pl022: mapped registers from %pa to %p\n",
+              &adev->res.start, pl022->virtbase);
 
        pl022->clk = devm_clk_get(&adev->dev, NULL);
        if (IS_ERR(pl022->clk)) {