lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAK5ve-+mpOzoutWQz7VXeqV4fZaPudfPjb4_178HoW81Gt_VrQ@mail.gmail.com>
Date:	Wed, 23 Jan 2013 15:46:14 -0800
From:	Bryan Wu <cooloney@...il.com>
To:	"Kim, Milo" <Milo.Kim@...com>
Cc:	Nathan Lynch <ntl@...ox.com>,
	"linux-leds@...r.kernel.org" <linux-leds@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2] leds-lp5521/3: use '%zu' for formatting 'size_t'

On Wed, Jan 23, 2013 at 3:43 PM, Kim, Milo <Milo.Kim@...com> wrote:
> The printk format of type 'size_t' is not '%d' but '%zu' or '%zx'.
> This patch fixes build warnings below.
>
>  drivers/leds/leds-lp5521.c: In function lp5521_firmware_loaded:
>  drivers/leds/leds-lp5521.c:257:4: warning: format %d expects argument of
>   type int, but argument 3 has type size_t [-Wformat]
>
>  drivers/leds/leds-lp5523.c: In function lp5523_firmware_loaded:
>  drivers/leds/leds-lp5523.c:283:4: warning: format %d expects argument of
>   type int, but argument 3 has type size_t [-Wformat]
>

OK, applied.
Thanks,
-Bryan

> Signed-off-by: Milo(Woogyom) Kim <milo.kim@...com>
> ---
>  drivers/leds/leds-lp5521.c |    2 +-
>  drivers/leds/leds-lp5523.c |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c
> index 80adfb4..1001347 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: %zu\n",
>                         fw->size);
>                 return;
>         }
> diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
> index 4ac7061..229f734 100644
> --- a/drivers/leds/leds-lp5523.c
> +++ b/drivers/leds/leds-lp5523.c
> @@ -279,7 +279,7 @@ static void lp5523_firmware_loaded(struct lp55xx_chip *chip)
>         const struct firmware *fw = chip->fw;
>
>         if (fw->size > LP5523_PROGRAM_LENGTH) {
> -               dev_err(&chip->cl->dev, "firmware data size overflow: %d\n",
> +               dev_err(&chip->cl->dev, "firmware data size overflow: %zu\n",
>                         fw->size);
>                 return;
>         }
> --
> 1.7.9.5
>
>
> Best Regards,
> Milo
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ