]> git.dujemihanovic.xyz Git - u-boot.git/commit
clk: sifive: Fix -Wint-to-pointer-cast warning
authorBin Meng <bmeng.cn@gmail.com>
Sun, 12 Sep 2021 03:15:09 +0000 (11:15 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 20 Oct 2021 02:59:09 +0000 (10:59 +0800)
commit2edb02ead760630a6495d4e583e2364d10cb850a
treefda4b7c5d57503abbcdf1665cb7c82a4000bebea
parent2fb91a2ea74e87d5e26e95f602c9f8e3951a35cf
clk: sifive: Fix -Wint-to-pointer-cast warning

dev_read_addr() returns a value of type fdt_addr_t which is a 64-bit
address and pd->va is a pointer. In a 32-bit build, this causes the
following warning seen when building sifive-prci.c:

  warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Change to use dev_read_addr_ptr().

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
drivers/clk/sifive/sifive-prci.c