[PATCH 11/11] driver: cache-v5l2: Fix type casting warning on RV32
Yu Chien Peter Lin
peterlin at andestech.com
Thu Jan 19 08:05:44 CET 2023
This patch fixes following warning for riscv32 compilation.
drivers/cache/cache-v5l2.c:122:16: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
122 | regs = (struct l2cache *)dev_read_addr(dev);
| ^
Signed-off-by: Yu Chien Peter Lin <peterlin at andestech.com>
---
drivers/cache/cache-v5l2.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/cache/cache-v5l2.c b/drivers/cache/cache-v5l2.c
index c6d3a8f893..eda07d3f29 100644
--- a/drivers/cache/cache-v5l2.c
+++ b/drivers/cache/cache-v5l2.c
@@ -119,7 +119,7 @@ static int v5l2_of_to_plat(struct udevice *dev)
struct v5l2_plat *plat = dev_get_plat(dev);
struct l2cache *regs;
- regs = (struct l2cache *)dev_read_addr(dev);
+ regs = (struct l2cache *)(uintptr_t)dev_read_addr(dev);
plat->regs = regs;
plat->iprefetch = -EINVAL;
--
2.34.1
More information about the U-Boot
mailing list