[U-Boot] [PATCH] dm: core: Correct address cast in dev_read_addr_ptr()
Bin Meng
bmeng.cn at gmail.com
Fri Sep 29 09:40:56 UTC 2017
On Thu, Sep 28, 2017 at 8:35 PM, Simon Glass <sjg at 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 at chromium.org>
> ---
>
> drivers/core/read.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
Reviewed-by: Bin Meng <bmeng.cn at gmail.com>
Tested-by: Bin Meng <bmeng.cn at gmail.com>
More information about the U-Boot
mailing list