All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t
@ 2020-01-14  9:06 ` Krzysztof Kozlowski
  0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-14  9:06 UTC (permalink / raw)
  To: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
	Krzysztof Kozlowski, Arnd Bergmann, linux-i2c, linux-kernel,
	linux-arm-kernel, Wolfram Sang, Jean Delvare, Jarkko Nikula

resource_size_t should be printed with its own size-independent format
to fix warnings when compiling on 64-bit platform (e.g. with
COMPILE_TEST):

    drivers/i2c/busses/i2c-pmcmsp.c: In function ‘pmcmsptwi_probe’:
    drivers/i2c/busses/i2c-pmcmsp.c:276:25: warning:
        format ‘%x’ expects argument of type ‘unsigned int’,
        but argument 3 has type ‘resource_size_t {aka long long unsigned int}’ [-Wformat=]

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Changes since v1:
1. Use %pap, not %pa[p].
---
 drivers/i2c/busses/i2c-pmcmsp.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/i2c/busses/i2c-pmcmsp.c b/drivers/i2c/busses/i2c-pmcmsp.c
index 4fde74eb34a7..9a2acf09f1cf 100644
--- a/drivers/i2c/busses/i2c-pmcmsp.c
+++ b/drivers/i2c/busses/i2c-pmcmsp.c
@@ -274,8 +274,8 @@ static int pmcmsptwi_probe(struct platform_device *pldev)
 	if (!request_mem_region(res->start, resource_size(res),
 				pldev->name)) {
 		dev_err(&pldev->dev,
-			"Unable to get memory/io address region 0x%08x\n",
-			res->start);
+			"Unable to get memory/io address region %pap\n",
+			&(res->start));
 		rc = -EBUSY;
 		goto ret_err;
 	}
@@ -285,7 +285,7 @@ static int pmcmsptwi_probe(struct platform_device *pldev)
 						resource_size(res));
 	if (!pmcmsptwi_data.iobase) {
 		dev_err(&pldev->dev,
-			"Unable to ioremap address 0x%08x\n", res->start);
+			"Unable to ioremap address %pap\n", &(res->start));
 		rc = -EIO;
 		goto ret_unreserve;
 	}
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-01-15 19:57 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-14  9:06 [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t Krzysztof Kozlowski
2020-01-14  9:06 ` Krzysztof Kozlowski
2020-01-14  9:06 ` [PATCH v2 2/4] i2c: pnx: " Krzysztof Kozlowski
2020-01-14  9:06   ` Krzysztof Kozlowski
2020-01-14  9:06 ` [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer Krzysztof Kozlowski
2020-01-14  9:06   ` Krzysztof Kozlowski
2020-01-15 17:43   ` Wolfram Sang
2020-01-15 17:43     ` Wolfram Sang
2020-01-15 19:57     ` Krzysztof Kozlowski
2020-01-15 19:57       ` Krzysztof Kozlowski
2020-01-14  9:06 ` [PATCH v2 4/4] i2c: stu300: " Krzysztof Kozlowski
2020-01-14  9:06   ` Krzysztof Kozlowski
2020-01-15 17:42   ` Wolfram Sang
2020-01-15 17:42     ` Wolfram Sang
2020-01-15 17:45 ` [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t Wolfram Sang
2020-01-15 17:45   ` Wolfram Sang
2020-01-15 19:51   ` Krzysztof Kozlowski
2020-01-15 19:51     ` Krzysztof Kozlowski

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.