cache: sifive: Fix -Wint-to-pointer-cast warning
authorBin Meng <bmeng.cn@gmail.com>
Sun, 12 Sep 2021 03:15:08 +0000 (11:15 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Wed, 20 Oct 2021 02:59:09 +0000 (10:59 +0800)
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>
drivers/cache/cache-sifive-ccache.c

index 76c0ab2..c8766f6 100644 (file)
@@ -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;
 }