[U-Boot] [PATCH 5/9] rockchip: rk3368: change type of ram-size field for a min()-calculation

Philipp Tomsich philipp.tomsich at theobroma-systems.com
Thu Jul 26 13:59:47 UTC 2018


With the recent changes of the underlying types for the ram size, we need
to cast the constant used in clamping to u64 instead of size_t.

Signed-off-by: Philipp Tomsich <philipp.tomsich at theobroma-systems.com>
---

 drivers/ram/rockchip/dmc-rk3368.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/ram/rockchip/dmc-rk3368.c b/drivers/ram/rockchip/dmc-rk3368.c
index 8d1b9fa..35d7605 100644
--- a/drivers/ram/rockchip/dmc-rk3368.c
+++ b/drivers/ram/rockchip/dmc-rk3368.c
@@ -960,7 +960,7 @@ static int rk3368_dmc_probe(struct udevice *dev)
 	* is SoC register space (i.e. reserved), and 0xfe000000~0xfeffffff is
 	* inaccessible for some IP controller.
 	*/
-	priv->info.size = min(priv->info.size, (size_t)0xfe000000);
+	priv->info.size = min(priv->info.size, (u64)0xfe000000);
 
 	return 0;
 }
-- 
2.1.4



More information about the U-Boot mailing list