* [PATCH 1/2] leds-lp5521: fix a build warning
@ 2013-01-23 8:07 Kim, Milo
2013-01-23 15:08 ` Nathan Lynch
0 siblings, 1 reply; 3+ messages in thread
From: Kim, Milo @ 2013-01-23 8:07 UTC (permalink / raw)
To: Bryan Wu; +Cc: linux-leds, linux-kernel
This patch removes a build warning below.(ARCH=x86_64)
drivers/leds/leds-lp5521.c: In function lp5521_firmware_loaded:
drivers/leds/leds-lp5521.c:257:4: warning: format %d expects argument of type in
t, but argument 3 has type size_t [-Wformat]
Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
---
drivers/leds/leds-lp5521.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
index 80adfb4..74946f4 100644
--- a/drivers/leds/leds-lp5521.c
+++ b/drivers/leds/leds-lp5521.c
@@ -253,7 +253,7 @@ static void lp5521_firmware_loaded(struct lp55xx_chip *chip)
const struct firmware *fw = chip->fw;
if (fw->size > LP5521_PROGRAM_LENGTH) {
- dev_err(&chip->cl->dev, "firmware data size overflow: %d\n",
+ dev_err(&chip->cl->dev, "firmware data size overflow: %zd\n",
fw->size);
return;
}
--
1.7.9.5
Best Regards,
Milo
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] leds-lp5521: fix a build warning
2013-01-23 8:07 [PATCH 1/2] leds-lp5521: fix a build warning Kim, Milo
@ 2013-01-23 15:08 ` Nathan Lynch
2013-01-23 18:12 ` Bryan Wu
0 siblings, 1 reply; 3+ messages in thread
From: Nathan Lynch @ 2013-01-23 15:08 UTC (permalink / raw)
To: Kim, Milo; +Cc: Bryan Wu, linux-leds, linux-kernel
On Wed, 2013-01-23 at 08:07 +0000, Kim, Milo wrote:
> This patch removes a build warning below.(ARCH=x86_64)
>
> drivers/leds/leds-lp5521.c: In function lp5521_firmware_loaded:
> drivers/leds/leds-lp5521.c:257:4: warning: format %d expects argument of type in
> t, but argument 3 has type size_t [-Wformat]
>
> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
> ---
> drivers/leds/leds-lp5521.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
> index 80adfb4..74946f4 100644
> --- a/drivers/leds/leds-lp5521.c
> +++ b/drivers/leds/leds-lp5521.c
> @@ -253,7 +253,7 @@ static void lp5521_firmware_loaded(struct lp55xx_chip *chip)
> const struct firmware *fw = chip->fw;
>
> if (fw->size > LP5521_PROGRAM_LENGTH) {
> - dev_err(&chip->cl->dev, "firmware data size overflow: %d\n",
> + dev_err(&chip->cl->dev, "firmware data size overflow: %zd\n",
> fw->size);
Documentation/printk-formats.txt says %zu is to be used for size_t.
Same comment goes for patch 2/2.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] leds-lp5521: fix a build warning
2013-01-23 15:08 ` Nathan Lynch
@ 2013-01-23 18:12 ` Bryan Wu
0 siblings, 0 replies; 3+ messages in thread
From: Bryan Wu @ 2013-01-23 18:12 UTC (permalink / raw)
To: Nathan Lynch; +Cc: Kim, Milo, linux-leds, linux-kernel
On Wed, Jan 23, 2013 at 7:08 AM, Nathan Lynch <ntl@pobox.com> wrote:
> On Wed, 2013-01-23 at 08:07 +0000, Kim, Milo wrote:
>> This patch removes a build warning below.(ARCH=x86_64)
>>
>> drivers/leds/leds-lp5521.c: In function lp5521_firmware_loaded:
>> drivers/leds/leds-lp5521.c:257:4: warning: format %d expects argument of type in
>> t, but argument 3 has type size_t [-Wformat]
>>
>> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
>> ---
>> drivers/leds/leds-lp5521.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
>> index 80adfb4..74946f4 100644
>> --- a/drivers/leds/leds-lp5521.c
>> +++ b/drivers/leds/leds-lp5521.c
>> @@ -253,7 +253,7 @@ static void lp5521_firmware_loaded(struct lp55xx_chip *chip)
>> const struct firmware *fw = chip->fw;
>>
>> if (fw->size > LP5521_PROGRAM_LENGTH) {
>> - dev_err(&chip->cl->dev, "firmware data size overflow: %d\n",
>> + dev_err(&chip->cl->dev, "firmware data size overflow: %zd\n",
>> fw->size);
>
> Documentation/printk-formats.txt says %zu is to be used for size_t.
>
> Same comment goes for patch 2/2.
>
>
I agree with Nathan here. It should be %zu and %zd is for ssize_t.
Please update and fold these 2 patches into one, Milo.
Thanks,
-Bryan
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-01-23 18:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-23 8:07 [PATCH 1/2] leds-lp5521: fix a build warning Kim, Milo
2013-01-23 15:08 ` Nathan Lynch
2013-01-23 18:12 ` Bryan Wu
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.