[PATCH v8 17/24] drivers: use dev_read_addr_index_ptr when cast to pointer

Simon Glass sjg at chromium.org
Mon Mar 13 04:10:21 CET 2023


On Sun, 12 Mar 2023 at 18:31, Johan Jonker <jbx6244 at gmail.com> wrote:
>
> The fdt_addr_t and phys_addr_t size have been decoupled. A 32bit CPU
> can expect 64-bit data from the device tree parser, so use
> dev_read_addr_index_ptr instead of the dev_read_addr_index function
> in the various files in the drivers directory that cast to a pointer.
> As we are there also streamline the error response to -EINVAL on return.
>
> Signed-off-by: Johan Jonker <jbx6244 at gmail.com>
> Reviewed-by: Michael Trimarchi <michael at amarulasolutions.com>
> ---
>
> Changed V6:
>   use -EINVAL on return
>   drop cast
> ---
>  drivers/mtd/nand/raw/cortina_nand.c |  4 ++--
>  drivers/net/dm9000x.c               |  2 +-
>  drivers/net/dwmac_meson8b.c         |  4 ++--
>  drivers/pci/pcie_dw_meson.c         |  8 ++++----
>  drivers/pci/pcie_dw_rockchip.c      |  8 ++++----
>  drivers/watchdog/sbsa_gwdt.c        | 12 ++++++------
>  6 files changed, 19 insertions(+), 19 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list