From f054f12089cb63cf59b99f5a3bee30e55f105be3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Mon, 17 Jul 2023 15:29:20 -0400 Subject: [PATCH] arm: sunxi: Correct warning in board_fit_config_name_match When building this with clang, we get a warning about having excess parenthesis here, or that we're incorrectly using "==" when we want "=". Correct these by using the common size macro. Signed-off-by: Tom Rini Reviewed-by: Simon Glass [Andre: Use SZ_512M as per Simon's suggestion] Signed-off-by: Andre Przywara --- board/sunxi/board.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/sunxi/board.c b/board/sunxi/board.c index 02fc3eef00..80589f9640 100644 --- a/board/sunxi/board.c +++ b/board/sunxi/board.c @@ -34,6 +34,7 @@ #include #include #include +#include #ifndef CONFIG_ARM64 #include #endif @@ -937,7 +938,7 @@ int board_fit_config_name_match(const char *name) #ifdef CONFIG_PINE64_DT_SELECTION if (strstr(best_dt_name, "-pine64-plus")) { /* Differentiate the Pine A64 boards by their DRAM size. */ - if ((gd->ram_size == 512 * 1024 * 1024)) + if (gd->ram_size == SZ_512M) best_dt_name = "sun50i-a64-pine64"; } #endif -- 2.39.5