* [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
* [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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 2/4] i2c: pnx: Use proper printk format for resource_size_t
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-14 9:06 ` Krzysztof Kozlowski
-1 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-pnx.c: In function ‘i2c_pnx_probe’:
drivers/i2c/busses/i2c-pnx.c:737:47: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 5 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-pnx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 6e0e546ef83f..79bb1c68d485 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -734,8 +734,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
if (ret < 0)
goto out_clock;
- dev_dbg(&pdev->dev, "%s: Master at %#8x, irq %d.\n",
- alg_data->adapter.name, res->start, alg_data->irq);
+ dev_dbg(&pdev->dev, "%s: Master at %pap, irq %d.\n",
+ alg_data->adapter.name, &(res->start), alg_data->irq);
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 2/4] i2c: pnx: 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-pnx.c: In function ‘i2c_pnx_probe’:
drivers/i2c/busses/i2c-pnx.c:737:47: warning:
format ‘%x’ expects argument of type ‘unsigned int’,
but argument 5 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-pnx.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-pnx.c b/drivers/i2c/busses/i2c-pnx.c
index 6e0e546ef83f..79bb1c68d485 100644
--- a/drivers/i2c/busses/i2c-pnx.c
+++ b/drivers/i2c/busses/i2c-pnx.c
@@ -734,8 +734,8 @@ static int i2c_pnx_probe(struct platform_device *pdev)
if (ret < 0)
goto out_clock;
- dev_dbg(&pdev->dev, "%s: Master at %#8x, irq %d.\n",
- alg_data->adapter.name, res->start, alg_data->irq);
+ dev_dbg(&pdev->dev, "%s: Master at %pap, irq %d.\n",
+ alg_data->adapter.name, &(res->start), alg_data->irq);
return 0;
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-14 9:06 ` Krzysztof Kozlowski
-1 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
iomem pointers should be printed with pointer format to hide the
actual value and fix warnings when compiling on 64-bit platform (e.g. with
COMPILE_TEST):
drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
drivers/i2c/busses/i2c-highlander.c:325:22: warning:
format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changes since v1:
1. None
---
drivers/i2c/busses/i2c-highlander.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index abfe3094c047..803dad70e2a7 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -322,7 +322,7 @@ static int highlander_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
tmp |= (SMMR_MODE0 | SMMR_MODE1);
break;
default:
- dev_err(dev->dev, "unsupported xfer size %d\n", dev->buf_len);
+ dev_err(dev->dev, "unsupported xfer size %zu\n", dev->buf_len);
return -EINVAL;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
@ 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
iomem pointers should be printed with pointer format to hide the
actual value and fix warnings when compiling on 64-bit platform (e.g. with
COMPILE_TEST):
drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
drivers/i2c/busses/i2c-highlander.c:325:22: warning:
format ‘%d’ expects argument of type ‘int’,
but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Changes since v1:
1. None
---
drivers/i2c/busses/i2c-highlander.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
index abfe3094c047..803dad70e2a7 100644
--- a/drivers/i2c/busses/i2c-highlander.c
+++ b/drivers/i2c/busses/i2c-highlander.c
@@ -322,7 +322,7 @@ static int highlander_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
tmp |= (SMMR_MODE0 | SMMR_MODE1);
break;
default:
- dev_err(dev->dev, "unsupported xfer size %d\n", dev->buf_len);
+ dev_err(dev->dev, "unsupported xfer size %zu\n", dev->buf_len);
return -EINVAL;
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 4/4] i2c: stu300: Use proper printk format for iomem pointer
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-14 9:06 ` Krzysztof Kozlowski
-1 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
iomem pointers should be printed with pointer format to hide the
actual value and fix warnings when compiling on 64-bit platform (e.g. with
COMPILE_TEST):
drivers/i2c/busses/i2c-stu300.c: In function ‘stu300_wait_while_busy’:
drivers/i2c/busses/i2c-stu300.c:446:76: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes since v1:
1. Add Linus' review tag.
---
drivers/i2c/busses/i2c-stu300.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index 8c3e2d409d63..42e0a53e7fa4 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -444,7 +444,7 @@ static int stu300_wait_while_busy(struct stu300_dev *dev)
"Attempt: %d\n", i+1);
dev_err(&dev->pdev->dev, "base address = "
- "0x%08x, reinit hardware\n", (u32) dev->virtbase);
+ "0x%p, reinit hardware\n", dev->virtbase);
(void) stu300_init_hw(dev);
}
--
2.7.4
^ permalink raw reply related [flat|nested] 18+ messages in thread
* [PATCH v2 4/4] i2c: stu300: Use proper printk format for iomem pointer
@ 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
iomem pointers should be printed with pointer format to hide the
actual value and fix warnings when compiling on 64-bit platform (e.g. with
COMPILE_TEST):
drivers/i2c/busses/i2c-stu300.c: In function ‘stu300_wait_while_busy’:
drivers/i2c/busses/i2c-stu300.c:446:76: warning:
cast from pointer to integer of different size [-Wpointer-to-int-cast]
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
Changes since v1:
1. Add Linus' review tag.
---
drivers/i2c/busses/i2c-stu300.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-stu300.c b/drivers/i2c/busses/i2c-stu300.c
index 8c3e2d409d63..42e0a53e7fa4 100644
--- a/drivers/i2c/busses/i2c-stu300.c
+++ b/drivers/i2c/busses/i2c-stu300.c
@@ -444,7 +444,7 @@ static int stu300_wait_while_busy(struct stu300_dev *dev)
"Attempt: %d\n", i+1);
dev_err(&dev->pdev->dev, "base address = "
- "0x%08x, reinit hardware\n", (u32) dev->virtbase);
+ "0x%p, reinit hardware\n", dev->virtbase);
(void) stu300_init_hw(dev);
}
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 18+ messages in thread
* Re: [PATCH v2 4/4] i2c: stu300: Use proper printk format for iomem pointer
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-15 17:42 ` Wolfram Sang
-1 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:42 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
Arnd Bergmann, linux-i2c, linux-kernel, linux-arm-kernel,
Jean Delvare, Jarkko Nikula
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
On Tue, Jan 14, 2020 at 10:06:05AM +0100, Krzysztof Kozlowski wrote:
> iomem pointers should be printed with pointer format to hide the
> actual value and fix warnings when compiling on 64-bit platform (e.g. with
> COMPILE_TEST):
>
> drivers/i2c/busses/i2c-stu300.c: In function ‘stu300_wait_while_busy’:
> drivers/i2c/busses/i2c-stu300.c:446:76: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
Applied to for-next, thanks!
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 4/4] i2c: stu300: Use proper printk format for iomem pointer
@ 2020-01-15 17:42 ` Wolfram Sang
0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:42 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Arnd Bergmann, Linus Walleij, linux-kernel, Jean Delvare,
Vladimir Zapolskiy, Jarkko Nikula, linux-i2c, Sylvain Lemieux,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 613 bytes --]
On Tue, Jan 14, 2020 at 10:06:05AM +0100, Krzysztof Kozlowski wrote:
> iomem pointers should be printed with pointer format to hide the
> actual value and fix warnings when compiling on 64-bit platform (e.g. with
> COMPILE_TEST):
>
> drivers/i2c/busses/i2c-stu300.c: In function ‘stu300_wait_while_busy’:
> drivers/i2c/busses/i2c-stu300.c:446:76: warning:
> cast from pointer to integer of different size [-Wpointer-to-int-cast]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
>
Applied to for-next, thanks!
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-15 17:43 ` Wolfram Sang
-1 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
Arnd Bergmann, linux-i2c, linux-kernel, linux-arm-kernel,
Jean Delvare, Jarkko Nikula
[-- Attachment #1: Type: text/plain, Size: 1395 bytes --]
On Tue, Jan 14, 2020 at 10:06:04AM +0100, Krzysztof Kozlowski wrote:
> iomem pointers should be printed with pointer format to hide the
> actual value and fix warnings when compiling on 64-bit platform (e.g. with
> COMPILE_TEST):
>
> drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
> drivers/i2c/busses/i2c-highlander.c:325:22: warning:
> format ‘%d’ expects argument of type ‘int’,
> but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Wrong commit message. buf_len is size_t and not an iomem pointer.
> ---
>
> Changes since v1:
> 1. None
> ---
> drivers/i2c/busses/i2c-highlander.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
> index abfe3094c047..803dad70e2a7 100644
> --- a/drivers/i2c/busses/i2c-highlander.c
> +++ b/drivers/i2c/busses/i2c-highlander.c
> @@ -322,7 +322,7 @@ static int highlander_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
> tmp |= (SMMR_MODE0 | SMMR_MODE1);
> break;
> default:
> - dev_err(dev->dev, "unsupported xfer size %d\n", dev->buf_len);
> + dev_err(dev->dev, "unsupported xfer size %zu\n", dev->buf_len);
> return -EINVAL;
> }
>
> --
> 2.7.4
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
@ 2020-01-15 17:43 ` Wolfram Sang
0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Arnd Bergmann, Linus Walleij, linux-kernel, Jean Delvare,
Vladimir Zapolskiy, Jarkko Nikula, linux-i2c, Sylvain Lemieux,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 1395 bytes --]
On Tue, Jan 14, 2020 at 10:06:04AM +0100, Krzysztof Kozlowski wrote:
> iomem pointers should be printed with pointer format to hide the
> actual value and fix warnings when compiling on 64-bit platform (e.g. with
> COMPILE_TEST):
>
> drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
> drivers/i2c/busses/i2c-highlander.c:325:22: warning:
> format ‘%d’ expects argument of type ‘int’,
> but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Wrong commit message. buf_len is size_t and not an iomem pointer.
> ---
>
> Changes since v1:
> 1. None
> ---
> drivers/i2c/busses/i2c-highlander.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/i2c/busses/i2c-highlander.c b/drivers/i2c/busses/i2c-highlander.c
> index abfe3094c047..803dad70e2a7 100644
> --- a/drivers/i2c/busses/i2c-highlander.c
> +++ b/drivers/i2c/busses/i2c-highlander.c
> @@ -322,7 +322,7 @@ static int highlander_i2c_smbus_xfer(struct i2c_adapter *adap, u16 addr,
> tmp |= (SMMR_MODE0 | SMMR_MODE1);
> break;
> default:
> - dev_err(dev->dev, "unsupported xfer size %d\n", dev->buf_len);
> + dev_err(dev->dev, "unsupported xfer size %zu\n", dev->buf_len);
> return -EINVAL;
> }
>
> --
> 2.7.4
>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t
2020-01-14 9:06 ` Krzysztof Kozlowski
@ 2020-01-15 17:45 ` Wolfram Sang
-1 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
Arnd Bergmann, linux-i2c, linux-kernel, linux-arm-kernel,
Jean Delvare, Jarkko Nikula
[-- Attachment #1: Type: text/plain, Size: 340 bytes --]
> + "Unable to get memory/io address region %pap\n",
> + &(res->start));
My first thought was "parens not needed"; not because I like being picky
but because it doesn't look more readable to me.
checkpatch agrees:
CHECK: Unnecessary parentheses around res->start
#30: FILE: drivers/i2c/busses/i2c-pmcmsp.c:278:
+ &(res->start));
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t
@ 2020-01-15 17:45 ` Wolfram Sang
0 siblings, 0 replies; 18+ messages in thread
From: Wolfram Sang @ 2020-01-15 17:45 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Arnd Bergmann, Linus Walleij, linux-kernel, Jean Delvare,
Vladimir Zapolskiy, Jarkko Nikula, linux-i2c, Sylvain Lemieux,
linux-arm-kernel
[-- Attachment #1.1: Type: text/plain, Size: 340 bytes --]
> + "Unable to get memory/io address region %pap\n",
> + &(res->start));
My first thought was "parens not needed"; not because I like being picky
but because it doesn't look more readable to me.
checkpatch agrees:
CHECK: Unnecessary parentheses around res->start
#30: FILE: drivers/i2c/busses/i2c-pmcmsp.c:278:
+ &(res->start));
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t
2020-01-15 17:45 ` Wolfram Sang
@ 2020-01-15 19:51 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-15 19:51 UTC (permalink / raw)
To: Wolfram Sang
Cc: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
Arnd Bergmann, linux-i2c, linux-kernel, linux-arm-kernel,
Jean Delvare, Jarkko Nikula
On Wed, Jan 15, 2020 at 06:45:53PM +0100, Wolfram Sang wrote:
>
> > + "Unable to get memory/io address region %pap\n",
> > + &(res->start));
>
> My first thought was "parens not needed"; not because I like being picky
> but because it doesn't look more readable to me.
>
> checkpatch agrees:
>
> CHECK: Unnecessary parentheses around res->start
> #30: FILE: drivers/i2c/busses/i2c-pmcmsp.c:278:
> + &(res->start));
Indeed... let me send v3.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 1/4] i2c: pmcmsp: Use proper printk format for resource_size_t
@ 2020-01-15 19:51 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-15 19:51 UTC (permalink / raw)
To: Wolfram Sang
Cc: Arnd Bergmann, Linus Walleij, linux-kernel, Jean Delvare,
Vladimir Zapolskiy, Jarkko Nikula, linux-i2c, Sylvain Lemieux,
linux-arm-kernel
On Wed, Jan 15, 2020 at 06:45:53PM +0100, Wolfram Sang wrote:
>
> > + "Unable to get memory/io address region %pap\n",
> > + &(res->start));
>
> My first thought was "parens not needed"; not because I like being picky
> but because it doesn't look more readable to me.
>
> checkpatch agrees:
>
> CHECK: Unnecessary parentheses around res->start
> #30: FILE: drivers/i2c/busses/i2c-pmcmsp.c:278:
> + &(res->start));
Indeed... let me send v3.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
2020-01-15 17:43 ` Wolfram Sang
@ 2020-01-15 19:57 ` Krzysztof Kozlowski
-1 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-15 19:57 UTC (permalink / raw)
To: Wolfram Sang
Cc: Vladimir Zapolskiy, Sylvain Lemieux, Linus Walleij,
Arnd Bergmann, linux-i2c, linux-kernel, linux-arm-kernel,
Jean Delvare, Jarkko Nikula
On Wed, Jan 15, 2020 at 06:43:37PM +0100, Wolfram Sang wrote:
> On Tue, Jan 14, 2020 at 10:06:04AM +0100, Krzysztof Kozlowski wrote:
> > iomem pointers should be printed with pointer format to hide the
> > actual value and fix warnings when compiling on 64-bit platform (e.g. with
> > COMPILE_TEST):
> >
> > drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
> > drivers/i2c/busses/i2c-highlander.c:325:22: warning:
> > format ‘%d’ expects argument of type ‘int’,
> > but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Wrong commit message. buf_len is size_t and not an iomem pointer.
I'll fix it up.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 3/4] i2c: highlander: Use proper printk format for iomem pointer
@ 2020-01-15 19:57 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2020-01-15 19:57 UTC (permalink / raw)
To: Wolfram Sang
Cc: Arnd Bergmann, Linus Walleij, linux-kernel, Jean Delvare,
Vladimir Zapolskiy, Jarkko Nikula, linux-i2c, Sylvain Lemieux,
linux-arm-kernel
On Wed, Jan 15, 2020 at 06:43:37PM +0100, Wolfram Sang wrote:
> On Tue, Jan 14, 2020 at 10:06:04AM +0100, Krzysztof Kozlowski wrote:
> > iomem pointers should be printed with pointer format to hide the
> > actual value and fix warnings when compiling on 64-bit platform (e.g. with
> > COMPILE_TEST):
> >
> > drivers/i2c/busses/i2c-highlander.c: In function ‘highlander_i2c_smbus_xfer’:
> > drivers/i2c/busses/i2c-highlander.c:325:22: warning:
> > format ‘%d’ expects argument of type ‘int’,
> > but argument 3 has type ‘size_t {aka long unsigned int}’ [-Wformat=]
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
>
> Wrong commit message. buf_len is size_t and not an iomem pointer.
I'll fix it up.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [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.