From 14643b33b0f7ea9cde6ce8230793562d4a1b475c Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 17 Oct 2021 13:21:05 +0200 Subject: soc/intel/*/acpi.c: Don't copy structs with `memcpy()` A regular assignment works just as well and also allows type-checking. Change-Id: Id772771f000ba3bad5d4af05f5651c0f0ee43d6d Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/58390 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel --- src/soc/intel/cannonlake/acpi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/soc/intel/cannonlake') diff --git a/src/soc/intel/cannonlake/acpi.c b/src/soc/intel/cannonlake/acpi.c index d0f38747cb..5e2d1425d3 100644 --- a/src/soc/intel/cannonlake/acpi.c +++ b/src/soc/intel/cannonlake/acpi.c @@ -131,7 +131,7 @@ acpi_cstate_t *soc_get_cstate_map(size_t *entries) } for (i = 0; i < *entries; i++) { - memcpy(&map[i], &cstate_map[set[i]], sizeof(acpi_cstate_t)); + map[i] = cstate_map[set[i]]; map[i].ctype = i + 1; } return map; -- cgit v1.2.3