[linux-yocto] [PATCH 22/52] drivers/spi: Fix Compiler Warnings

Daniel Dragomir daniel.dragomir at windriver.com
Wed Jan 28 09:18:36 PST 2015


From: John Jacques <john.jacques at lsi.com>

Fixes compilation warning introduced by:
- spi: Revert to mainline spi-pl022
  commit 4dbd5a248f16e8c16d09132006816a0000a82f0d
  author: Anders Berg

See below the warning message:

drivers/spi/spi-pl022.c: In function 'pl022_probe':
drivers/spi/spi-pl022.c:2222:2: warning: format '%x' expects argument of
type 'unsigned int', but argument 2 has type 'resource_size_t'
[-Wformat=]
  pr_info("pl022: mapped registers from 0x%08x to %p\n",

Signed-off-by: John Jacques <john.jacques at lsi.com>
---
 drivers/spi/spi-pl022.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/spi/spi-pl022.c b/drivers/spi/spi-pl022.c
index c2b650f..871ac00 100644
--- a/drivers/spi/spi-pl022.c
+++ b/drivers/spi/spi-pl022.c
@@ -2219,8 +2219,8 @@ static int pl022_probe(struct amba_device *adev, const struct amba_id *id)
 		status = -ENOMEM;
 		goto err_no_ioremap;
 	}
-	pr_info("pl022: mapped registers from 0x%08x to %p\n",
-			adev->res.start, pl022->virtbase);
+	pr_info("pl022: mapped registers from 0x%08lx to %p\n",
+		(unsigned long)adev->res.start, pl022->virtbase);
 
 	pl022->clk = devm_clk_get(&adev->dev, NULL);
 	if (IS_ERR(pl022->clk)) {
-- 
1.8.1.4



More information about the linux-yocto mailing list