dm: core: Correct address cast in dev_read_addr_ptr()
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
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.
---
drivers/core/read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/core/read.c +2 -1
@@ -7,6 +7,7 @@#include <common.h> #include <dm.h> +#include <mapmem.h> #include <dm/of_access.h> int dev_read_u32_default (struct udevice *dev,const char *propname,int def)
@@ -61,7 +62,7 @@ void *dev_read_addr_ptr(struct udevice *dev) {fdt_addr_t addr =dev_read_addr (dev); -return (addr ==FDT_ADDR_T_NONE ) ?NULL : (void *)addr; +return (addr ==FDT_ADDR_T_NONE ) ?NULL :map_sysmem (addr,0 ); } fdt_addr_t dev_read_addr_size(struct udevice *dev, const char *property,
Signature · 1 line
2.14.2.822.g60be5d43e6-goog
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Quoted 11 lines · Simon Glass
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;
Quoted 5 lines
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 <[email protected]>
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Simon,
Quoted 13 lines · Dr. Philipp Tomsich
Quoted 12 lines · Simon Glass
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;
Quoted 7 lines
Quoted 5 lines
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 <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>
I’ll pull this one in through u-boot-rockchip now, as Tom raised it as a build issue against my last pull-request.
Philipp.
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Quoted 21 lines · Dr. Philipp Tomsich
Simon,
Quoted 19 lines · Dr. Philipp Tomsich
Quoted 17 lines · Simon Glass
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 <[email protected]>
Quoted 7 lines
Quoted 1 line
Reviewed-by Philipp Tomsich <[email protected]>Acked-by Philipp Tomsich <[email protected]>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 :)
Signature · 8 lines
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>
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Quoted 28 lines · Tom Rini
Quoted 24 lines · Dr. Philipp Tomsich
Simon,
Quoted 20 lines · Dr. Philipp Tomsich
Quoted 12 lines · Simon Glass
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;Quoted 5 lines
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 <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>
Quoted 7 lines
Quoted 4 lines
Acked-by Philipp Tomsich <[email protected]>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 :)
I already backed Jagan’s change to mach-tegra/cache.c out (missed that during my review and testing) and this is already running on Travis.
I understood you that I should also address those warnings related to the Rockchip code? If not, I’d rather have this one go through the -dm tree…
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Quoted 36 lines · Dr. Philipp Tomsich
Quoted 28 lines · Tom Rini
Quoted 24 lines · Dr. Philipp Tomsich
Simon,
Quoted 20 lines · Dr. Philipp Tomsich
Quoted 12 lines · Simon Glass
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;Quoted 5 lines
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 <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>Quoted 7 lines
Quoted 4 lines
Acked-by Philipp Tomsich <[email protected]>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 :)
Quoted 6 lines
I already backed Jagan’s change to
mach-tegra/cache.cout (missed that during my review and testing) and this is already running on Travis.I understood you that I should also address those warnings related to the Rockchip code? If not, I’d rather have this one go through the -dm tree…
The DM warning fix can come via Simon's tree, thanks!
Signature · 8 lines
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/71725dec/attachment.sig>
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
Quoted 36 lines · Dr. Philipp Tomsich
Quoted 28 lines · Tom Rini
Quoted 24 lines · Dr. Philipp Tomsich
Simon,
Quoted 20 lines · Dr. Philipp Tomsich
Quoted 12 lines · Simon Glass
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;Quoted 5 lines
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 <[email protected]>Reviewed-by Philipp Tomsich <[email protected]>Quoted 7 lines
Quoted 4 lines
Acked-by Philipp Tomsich <[email protected]>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 :)
Quoted 6 lines
I already backed Jagan’s change to
mach-tegra/cache.cout (missed that during my review and testing) and this is already running on Travis.I understood you that I should also address those warnings related to the Rockchip code? If not, I’d rather have this one go through the -dm tree…
The DM warning fix can come via Simon's tree, thanks!
Signature · 3 lines
Tom Applied to u-boot-dm thanks!
PATCH 1/1 dm: core: Correct address cast in dev_read_addr_ptr()
In reply to Simon GlassQuoted 11 lines · Simon Glass
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.
Quoted 7 lines
Fixes c131c8bca8 (dm: core: add dev_read_addr_ptr())Signed-off-by Simon Glass <[email protected]>---
drivers/core/read.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)