diff options
author | Duncan Laurie <dlaurie@google.com> | 2020-04-29 11:39:08 -0700 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-05-01 06:54:51 +0000 |
commit | ed6eb2713a738c45ab876941d6b5805fd00bf13c (patch) | |
tree | 74d01696504e047b0592b72f2bd9ba1c4f866f4c /src/arch | |
parent | de13519ca58c12845b1bdc525654f5da5365b7bf (diff) | |
download | coreboot-ed6eb2713a738c45ab876941d6b5805fd00bf13c.tar.xz |
acpi_device: Make integer array input variable const
An array of 64bit integers is passed to acpi_dp_add_integer_array() but
it is not const so can't take a const array without a compiler error.
The function does not modify the array so it can be made const without
breaking anything and allowing a const array to be passed in the future.
BUG=b:146482091
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I98ecdaef5ddfa2026390e2812f5ea841ee51f073
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40882
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/arch')
-rw-r--r-- | src/arch/x86/acpi_device.c | 2 | ||||
-rw-r--r-- | src/arch/x86/include/arch/acpi_device.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index f3ee1e7ec4..bef1a5db73 100644 --- a/src/arch/x86/acpi_device.c +++ b/src/arch/x86/acpi_device.c @@ -879,7 +879,7 @@ struct acpi_dp *acpi_dp_add_array(struct acpi_dp *dp, struct acpi_dp *array) } struct acpi_dp *acpi_dp_add_integer_array(struct acpi_dp *dp, const char *name, - uint64_t *array, int len) + const uint64_t *array, int len) { struct acpi_dp *dp_array; int i; diff --git a/src/arch/x86/include/arch/acpi_device.h b/src/arch/x86/include/arch/acpi_device.h index ed64cd8a27..bc71e0264d 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -482,7 +482,7 @@ struct acpi_dp *acpi_dp_add_array(struct acpi_dp *dp, struct acpi_dp *array); /* Add an array of integers Device Property */ struct acpi_dp *acpi_dp_add_integer_array(struct acpi_dp *dp, const char *name, - uint64_t *array, int len); + const uint64_t *array, int len); /* Add a GPIO binding Device Property */ struct acpi_dp *acpi_dp_add_gpio(struct acpi_dp *dp, const char *name, |