From: Bin Meng <bmeng.cn@gmail.com>
Date: Sun, 12 Sep 2021 03:15:08 +0000 (+0800)
Subject: cache: sifive: Fix -Wint-to-pointer-cast warning
X-Git-Tag: v2025.01-rc5-pxa1908~1674^2~9
X-Git-Url: http://git.dujemihanovic.xyz/img/static/login.html?a=commitdiff_plain;h=2fb91a2ea74e87d5e26e95f602c9f8e3951a35cf;p=u-boot.git

cache: sifive: Fix -Wint-to-pointer-cast warning

The following warning is seen in cache-sifive-ccache.c in a 32-bit build:

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

Fix by casting it with uintptr_t.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
---

diff --git a/drivers/cache/cache-sifive-ccache.c b/drivers/cache/cache-sifive-ccache.c
index 76c0ab26ae..c8766f6242 100644
--- a/drivers/cache/cache-sifive-ccache.c
+++ b/drivers/cache/cache-sifive-ccache.c
@@ -38,7 +38,7 @@ static int sifive_ccache_get_info(struct udevice *dev, struct cache_info *info)
 {
 	struct sifive_ccache *priv = dev_get_priv(dev);
 
-	info->base = (phys_addr_t)priv->base;
+	info->base = (uintptr_t)priv->base;
 
 	return 0;
 }