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/include/acpi/acpigen.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/include') diff --git a/src/include/acpi/acpigen.h b/src/include/acpi/acpigen.h index c019130e28..cf14c7f39d 100644 --- a/src/include/acpi/acpigen.h +++ b/src/include/acpi/acpigen.h @@ -357,8 +357,8 @@ void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, void acpigen_write_pss_object(const struct acpi_sw_pstate *pstate_values, size_t nentries); typedef enum { SW_ALL = 0xfc, SW_ANY = 0xfd, HW_ALL = 0xfe } PSD_coord; void acpigen_write_PSD_package(u32 domain, u32 numprocs, PSD_coord coordtype); -void acpigen_write_CST_package_entry(acpi_cstate_t *cstate); -void acpigen_write_CST_package(acpi_cstate_t *entry, int nentries); +void acpigen_write_CST_package_entry(const acpi_cstate_t *cstate); +void acpigen_write_CST_package(const acpi_cstate_t *entry, int nentries); typedef enum { CSD_HW_ALL = 0xfe } CSD_coord; void acpigen_write_CSD_package(u32 domain, u32 numprocs, CSD_coord coordtype, u32 index); -- cgit v1.2.3