From d2794cea1291f7f6e35b426b8b66cbb08da6d532 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sun, 17 Oct 2021 12:59:43 +0200 Subject: acpi/acpigen: Constify CST functions' pointers The `acpigen_write_CST_package` and `acpigen_write_CST_package_entry` functions don't modify the provided C-state information. So, make the pointer parameters read-only to enforce this. Also constify arguments where possible. Change-Id: I9e18d82ee6c16e4435b8fad6d467e58c33194cf4 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/58391 Tested-by: build bot (Jenkins) Reviewed-by: Raul Rangel Reviewed-by: Felix Held --- src/soc/amd/cezanne/acpi.c | 2 +- src/soc/amd/picasso/acpi.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/soc/amd') diff --git a/src/soc/amd/cezanne/acpi.c b/src/soc/amd/cezanne/acpi.c index 3b3a88befe..d390ca4f22 100644 --- a/src/soc/amd/cezanne/acpi.c +++ b/src/soc/amd/cezanne/acpi.c @@ -279,7 +279,7 @@ void generate_cpu_entries(const struct device *device) .addrl = PS_STS_REG, }; - acpi_cstate_t cstate_info[] = { + const acpi_cstate_t cstate_info[] = { [0] = { .ctype = 1, .latency = 1, diff --git a/src/soc/amd/picasso/acpi.c b/src/soc/amd/picasso/acpi.c index 99c1648f8a..c0808d9f2e 100644 --- a/src/soc/amd/picasso/acpi.c +++ b/src/soc/amd/picasso/acpi.c @@ -289,7 +289,7 @@ void generate_cpu_entries(const struct device *device) .addrl = PS_STS_REG, }; - acpi_cstate_t cstate_info[] = { + const acpi_cstate_t cstate_info[] = { [0] = { .ctype = 1, .latency = 1, -- cgit v1.2.3