u-boot/drivers
Masahiro Yamada 8613c8d897 treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr()
Use the _ptr suffixed variant instead of casting. Also, convert it to
dev_read_addr_ptr(), which is safe to CONFIG_OF_LIVE.

One curious part is an error check like follows in
drivers/watchdog/omap_wdt.c:

    priv->regs = (struct wd_timer *)devfdt_get_addr(dev);
    if (!priv->regs)
            return -EINVAL;

devfdt_get_addr() returns FDT_ADDR_T_NONE (i.e. -1) on error.
So, this code does not catch any error in DT parsing.

dev_read_addr_ptr() returns NULL on error, so this error check
will work.

I generated this commit by the following command:

 $ find . -name .git -prune -o -name '*.[ch]' -type f -print | \
   xargs sed -i -e 's/([^*)]*\*)devfdt_get_addr(/dev_read_addr_ptr(/'

I manually fixed drivers/usb/host/ehci-mx6.c

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2020-07-25 14:46:57 -06:00
..
adc treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
ata Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
axi common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
bios_emulator common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
block common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
board common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
bootcount bootcount_ext: Add Ext4 build dependency 2020-06-02 17:27:04 -04:00
bus bus: uniphier-system-bus: move hardware init from board files 2020-07-11 21:30:21 +09:00
cache common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
clk treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
core dm: core Fix long line in device_bind_common() 2020-07-24 19:25:15 -06:00
cpu cpu: Convert the methods to use a const udevice * 2020-07-25 14:46:57 -06:00
crypto drivers: crypto: mod_exp_sw: Re-add DM_FLAG_PRE_RELOC 2020-05-19 14:01:47 -04:00
ddr treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
demo common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dfu common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
dma Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
fastboot common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
firmware firmware: zynqmp: Change panic logic in zynqmp_pmufw_load_config_object() 2020-06-24 13:07:57 +02:00
fpga arm64: xilinx: Print fpga error value in hex 2020-06-24 13:11:08 +02:00
gpio treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
hwspinlock common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
i2c treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
input treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
led common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
mailbox Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
memory SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
misc Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
mmc treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
mtd mtd: spinand: micron: Add new Micron SPI NAND devices with multiple dies 2020-07-20 22:29:18 +05:30
net Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
nvme nvme: Invalidate dcache before submitting admin cmd 2020-06-23 14:43:23 -04:00
pch common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
pci pci: rockchip: Drop legacy PHY driver 2020-07-22 20:22:49 +08:00
pci_endpoint treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
phy phy: Add Rockchip PCIe PHY driver 2020-07-22 20:22:42 +08:00
pinctrl treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
power Merge https://gitlab.denx.de/u-boot/custodians/u-boot-x86 2020-07-17 08:04:48 -04:00
pwm treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
qe treewide: convert bd_t to struct bd_info by coccinelle 2020-07-17 09:30:13 -04:00
ram ram: sifive: Avoid using hardcoded ram base and size 2020-07-24 14:56:29 +08:00
remoteproc common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
reset Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
rng common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
rtc Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
scsi common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
serial treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
smem common: Drop linux/bug.h from common header 2020-05-18 21:19:23 -04:00
soc dm: soc: Introduce soc_ti_k3 driver for TI K3 SoCs 2020-07-25 14:46:57 -06:00
sound sound: Add an ACPI driver for Maxim MAX98357ac 2020-07-17 14:32:24 +08:00
spi treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
spmi Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
sysreset sysreset: syscon: Support value property 2020-07-24 14:55:49 +08:00
tee common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
thermal thermal: imx_scu_thermal: prevent boot hang with zero pdata 2020-05-22 13:29:25 +02:00
timer Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
tpm drivers: rename drivers to match compatible string 2020-07-09 18:57:22 -06:00
ufs common: Drop linux/bitops.h from common header 2020-05-18 21:19:23 -04:00
usb treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
video treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
virtio virtio: VIRTIO_RNG depends on DM_RNG 2020-06-05 04:04:41 +02:00
w1 Revert "Merge tag 'dm-pull-20jul20' of git://git.denx.de/u-boot-dm" 2020-07-24 08:42:06 -04:00
w1-eeprom common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
watchdog treewide: convert (void *)devfdt_get_addr() to dev_read_addr_ptr() 2020-07-25 14:46:57 -06:00
Kconfig bus: uniphier-system-bus: add UniPhier System Bus driver 2020-07-11 21:30:21 +09:00
Makefile bus: uniphier-system-bus: add UniPhier System Bus driver 2020-07-11 21:30:21 +09:00