[U-Boot] [PATCH] dm: core: Correct address cast in dev_read_addr_ptr()

Tom Rini trini at konsulko.com
Sat Sep 30 20:32:52 UTC 2017


On Sat, Sep 30, 2017 at 06:08:02PM +0200, Dr. Philipp Tomsich wrote:
> Simon,
> 
> > On 28 Sep 2017, at 18:14, Dr. Philipp Tomsich <philipp.tomsich at theobroma-systems.com> wrote:
> > 
> > 
> >> On 28 Sep 2017, at 14:35, 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>
> > 
> > Reviewed-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> 
> 
> Acked-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
> 
> I’ll pull this one in through u-boot-rockchip now, as Tom raised it as a build
> issue against my last pull-request.

Well, that's for the minor existing warning.  The big problem is the
build failures :)

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170930/2763bfb1/attachment.sig>


More information about the U-Boot mailing list