[PATCH] ARM: mvebu: Drop a write-only variable

Andrew Lunn andrew at lunn.ch
Mon Jul 8 06:42:40 PDT 2024


On Mon, Jul 08, 2024 at 11:31:42AM +0200, Uwe Kleine-König wrote:
> 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?

I think it is too late for that now, although it would of been
correct. There could be DT blobs in use which have this wrong, and now
enforcing it would cause a regression. The best we can do is print a
warning.

	Andrew



More information about the linux-arm-kernel mailing list