]> git.ipfire.org Git - thirdparty/linux.git/commit
EDAC/amd64: Generate ctl_name string at runtime
authorAvadhut Naik <avadhut.naik@amd.com>
Thu, 6 Nov 2025 01:54:44 +0000 (01:54 +0000)
committerBorislav Petkov (AMD) <bp@alien8.de>
Thu, 6 Nov 2025 11:35:59 +0000 (12:35 +0100)
commite9abd990aefd7d8a64f90fff2d391e42b8d512f7
treefb89746efc6a560cf1f3e7d09409d517856f58a1
parent3a8660878839faadb4f1a6dd72c3179c1df56787
EDAC/amd64: Generate ctl_name string at runtime

Currently, the ctl_name string is statically assigned based on the family and
model of the SOC when the amd64_edac module is loaded.

The same, however, is not exactly needed as the string can be generated and
assigned at runtime through scnprintf().

Remove all static assignments and generate the string at runtime. Also,
cleanup the switch cases which became defunct and consolidate identical cases.

Signed-off-by: Avadhut Naik <avadhut.naik@amd.com>
Signed-off-by: Borislav Petkov (AMD) <bp@alien8.de>
Link: https://lore.kernel.org/20251106015727.1987246-1-avadhut.naik@amd.com
drivers/edac/amd64_edac.c
drivers/edac/amd64_edac.h