Commit 815703e2 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Borislav Petkov (AMD)
Browse files

EDAC/mem_repair: Reduce stack usage in edac_mem_repair_get_desc()



Constructing an array on the stack adds complexity and can exceed the
warning limit for per-function stack usage:

  drivers/edac/mem_repair.c:361:5: error: stack frame size (1296) exceeds
  limit (1280) in 'edac_mem_repair_get_desc' [-Werror,-Wframe-larger-than]

Change this to have the actual attribute array allocated statically and then
just add the instance number on the per-instance copy.

Fixes: 699ea521 ("EDAC: Add a memory repair control feature")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarBorislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20250620114135.4017183-1-arnd@kernel.org
parent 10fa9a4e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment