All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lukasz Majewski <l.majewski@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 03/13] dfu: Build warning fixes for 64-bit
Date: Mon, 23 Mar 2015 11:06:49 +0100	[thread overview]
Message-ID: <20150323110649.6da8cb3a@amdc2363> (raw)
In-Reply-To: <1426851688-6429-3-git-send-email-thierry.reding@gmail.com>

Hi Thierry,

> From: Thierry Reding <treding@nvidia.com>
> 
> Explicitly cast the result of a pointer arithmetic to unsigned int so
> that it matches the corresponding printf format string. While at it,
> use %p to print a buffer address rather than %x and an explicit cast
> (which causes a warning in this case because it's cast to unsigned
> int instead of unsigned long).
> 
> Cc: ?ukasz Majewski <l.majewski@samsung.com>
> Signed-off-by: Thierry Reding <treding@nvidia.com>
> ---
>  drivers/dfu/dfu.c     | 2 +-
>  drivers/dfu/dfu_mmc.c | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/dfu/dfu.c b/drivers/dfu/dfu.c
> index 0560afa9ffa5..5c137acfaa04 100644
> --- a/drivers/dfu/dfu.c
> +++ b/drivers/dfu/dfu.c
> @@ -200,7 +200,7 @@ int dfu_write(struct dfu_entity *dfu, void *buf,
> int size, int blk_seq_num) 
>  	debug("%s: name: %s buf: 0x%p size: 0x%x p_num: 0x%x offset:
> 0x%llx bufoffset: 0x%x\n", __func__, dfu->name, buf, size,
> blk_seq_num, dfu->offset,
> -	      dfu->i_buf - dfu->i_buf_start);
> +	      (unsigned int)(dfu->i_buf - dfu->i_buf_start));
>  
>  	if (!dfu->inited) {
>  		/* initial state */
> diff --git a/drivers/dfu/dfu_mmc.c b/drivers/dfu/dfu_mmc.c
> index fd865e11212e..2a780f7b5d31 100644
> --- a/drivers/dfu/dfu_mmc.c
> +++ b/drivers/dfu/dfu_mmc.c
> @@ -156,7 +156,7 @@ static int mmc_file_op(enum dfu_op op, struct
> dfu_entity *dfu, dfu->data.mmc.dev, dfu->data.mmc.part);
>  
>  	if (op != DFU_OP_SIZE)
> -		sprintf(cmd_buf + strlen(cmd_buf), " 0x%x",
> (unsigned int)buf);
> +		sprintf(cmd_buf + strlen(cmd_buf), " %p", buf);
>  
>  	sprintf(cmd_buf + strlen(cmd_buf), " %s", dfu->name);
>  

Acked-by: Lukasz Majewski <l.majewski@samsung.com>
Tested-by: Lukasz Majewski <l.majewski@samsung.com>
[test HW: trats - Exynos4210 board]

-- 
Best regards,

Lukasz Majewski

Samsung R&D Institute Poland (SRPOL) | Linux Platform Group

  reply	other threads:[~2015-03-23 10:06 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-20 11:41 [U-Boot] [PATCH 01/13] ARM: tegra: Fix build failures and warnings on 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 02/13] usb: Build warning fixes for 64-bit Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 03/13] dfu: " Thierry Reding
2015-03-23 10:06   ` Lukasz Majewski [this message]
2015-03-20 11:41 ` [U-Boot] [PATCH 04/13] i2c: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 05/13] mmc: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 06/13] net: rtl8169: " Thierry Reding
2015-03-20 18:32   ` Joe Hershberger
2015-03-20 11:41 ` [U-Boot] [PATCH 07/13] pci: tegra: " Thierry Reding
2015-03-20 11:41 ` [U-Boot] [PATCH 08/13] usb: eth: asix: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 09/13] usb: ci_udc: " Thierry Reding
2015-03-20 16:10   ` Stephen Warren
2015-03-25 11:49   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 10/13] usb: mass-storage: " Thierry Reding
2015-03-23 10:20   ` Lukasz Majewski
2015-03-23 10:23   ` Lukasz Majewski
2015-03-25 11:43   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 11/13] usb: ehci-hcd: " Thierry Reding
2015-03-25 11:50   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 12/13] usb: ehci-tegra: " Thierry Reding
2015-03-25 11:42   ` Marek Vasut
2015-03-20 11:41 ` [U-Boot] [PATCH 13/13] fdt: " Thierry Reding

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150323110649.6da8cb3a@amdc2363 \
    --to=l.majewski@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.