[PATCH] ARM: mvebu: Drop a write-only variable
Uwe Kleine-König
u.kleine-koenig at baylibre.com
Mon Jul 8 02:31:42 PDT 2024
This fixes a W=1 compiler error:
arch/arm/mach-mvebu/board-v7.c: In function ‘mvebu_scan_mem’:
arch/arm/mach-mvebu/board-v7.c:84:27: error: variable ‘size’ set but not used [-Werror=unused-but-set-variable]
84 | u64 base, size;
| ^~~~
Fixes: 8da2b2f7ceee ("ARM: mvebu: reserve the first 10 KB of each memory bank for suspend/resume")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
---
Hello,
not entirely sure about the correctness of this patch. Maybe you want to
error out if size < MVEBU_DDR_TRAINING_AREA_SZ?
Best regards
Uwe
arch/arm/mach-mvebu/board-v7.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c
index fd5d0c8ff695..3fc4cce0225d 100644
--- a/arch/arm/mach-mvebu/board-v7.c
+++ b/arch/arm/mach-mvebu/board-v7.c
@@ -81,10 +81,11 @@ static int __init mvebu_scan_mem(unsigned long node, const char *uname,
endp = reg + (l / sizeof(__be32));
while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
- u64 base, size;
+ u64 base;
base = dt_mem_next_cell(dt_root_addr_cells, ®);
- size = dt_mem_next_cell(dt_root_size_cells, ®);
+ /* skip over size */
+ dt_mem_next_cell(dt_root_size_cells, ®);
memblock_reserve(base, MVEBU_DDR_TRAINING_AREA_SZ);
}
base-commit: 0b58e108042b0ed28a71cd7edf5175999955b233
--
2.43.0
More information about the linux-arm-kernel
mailing list