All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bin Meng <bmeng.cn@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dm: core: Correct address cast in dev_read_addr_ptr()
Date: Fri, 29 Sep 2017 17:40:56 +0800	[thread overview]
Message-ID: <CAEUhbmX4ZpAj7LQORCo=JPghfgGhw2+g95tpGjhDMCXz8Q0D8g@mail.gmail.com> (raw)
In-Reply-To: <20170928123515.154787-1-sjg@chromium.org>

On Thu, Sep 28, 2017 at 8:35 PM, Simon Glass <sjg@chromium.org> wrote:
> This currently causes a warning in sandbox and will not do the right
> thing:
>
> drivers/core/read.c: In function ‘dev_read_addr_ptr’:
> drivers/core/read.c:64:44: warning: cast to pointer from integer of
>         different size [-Wint-to-pointer-cast]
>   return (addr == FDT_ADDR_T_NONE) ? NULL : (void *)addr;
>
> Use map_sysmem() which is the correct way to convert an address to a
> pointer.
>
> Fixes: c131c8bca8 (dm: core: add dev_read_addr_ptr())
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
>  drivers/core/read.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>

Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>

      parent reply	other threads:[~2017-09-29  9:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-28 12:35 [U-Boot] [PATCH] dm: core: Correct address cast in dev_read_addr_ptr() Simon Glass
2017-09-28 16:14 ` Dr. Philipp Tomsich
2017-09-30 16:08   ` Dr. Philipp Tomsich
2017-09-30 20:32     ` Tom Rini
2017-09-30 22:31       ` Dr. Philipp Tomsich
2017-09-30 23:25         ` Tom Rini
2017-11-17 15:41         ` sjg at google.com
2017-09-29  9:40 ` Bin Meng [this message]

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='CAEUhbmX4ZpAj7LQORCo=JPghfgGhw2+g95tpGjhDMCXz8Q0D8g@mail.gmail.com' \
    --to=bmeng.cn@gmail.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.