Duncan Laurie has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/40882 )
Change subject: acpi_device: Make integer array input variable const ......................................................................
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 --- M src/arch/x86/acpi_device.c M src/arch/x86/include/arch/acpi_device.h 2 files changed, 2 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/40882/1
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index f3ee1e7..bef1a5d 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_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 ed64cd8..bc71e02 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -482,7 +482,7 @@
/* 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,
Furquan Shaikh has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40882 )
Change subject: acpi_device: Make integer array input variable const ......................................................................
Patch Set 2: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/40882 )
Change subject: acpi_device: Make integer array input variable const ......................................................................
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 --- M src/arch/x86/acpi_device.c M src/arch/x86/include/arch/acpi_device.h 2 files changed, 2 insertions(+), 2 deletions(-)
Approvals: build bot (Jenkins): Verified Furquan Shaikh: Looks good to me, approved
diff --git a/src/arch/x86/acpi_device.c b/src/arch/x86/acpi_device.c index f3ee1e7..bef1a5d 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_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 ed64cd8..bc71e02 100644 --- a/src/arch/x86/include/arch/acpi_device.h +++ b/src/arch/x86/include/arch/acpi_device.h @@ -482,7 +482,7 @@
/* 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,
9elements QA has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/40882 )
Change subject: acpi_device: Make integer array input variable const ......................................................................
Patch Set 3:
Automatic boot test returned (PASS/FAIL/TOTAL): 4/0/4 Emulation targets: "QEMU x86 q35/ich9" using payload TianoCore : SUCCESS : https://lava.9esec.io/r/3018 "QEMU x86 q35/ich9" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/3017 "QEMU x86 i440fx/piix4" using payload SeaBIOS : SUCCESS : https://lava.9esec.io/r/3016 "QEMU AArch64" using payload LinuxBoot_u-root_kexec : SUCCESS : https://lava.9esec.io/r/3015
Please note: This test is under development and might not be accurate at all!