ACPI: APEI: EINJ: make read-only array non_mmio_desc static const
Subsystems (3)
PATCH 1/1 ACPI: APEI: EINJ: make read-only array non_mmio_desc static const
Don't populate the read-only array non_mmio_desc on the stack at run time, instead make it static const.
Signed-off-by Colin Ian King <[email protected]>
--- drivers/acpi/apei/einj-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/acpi/apei/einj-core.c +1 -1
@@ -679,7 +679,7 @@ static bool is_allowed_range(u64 base_addr, u64 size)* region intersects with known resource. So do an allow list check for * IORES_DESCs that definitely or most likely not MMIO. */ -int non_mmio_desc[] = { +static const int non_mmio_desc[] = {IORES_DESC_CRASH_KERNEL ,IORES_DESC_ACPI_TABLES ,IORES_DESC_ACPI_NV_STORAGE ,
Signature · 1 line
2.51.0
Quoted 14 lines · Colin Ian King
Don't populate the read-only array
non_mmio_descon the stack at run time, instead make it static const.Signed-off-by Colin Ian King <[email protected]>--- drivers/acpi/apei/einj-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/acpi/apei/einj-core.c +0
-0
drivers/acpi/apei/einj-core.c static bool is_allowed_range(u64 base_addr, u64 size)
Quoted 9 lines
drivers/acpi/apei/einj-core.c +1
-2@@ -679,7 +679,7 @@ static bool is_allowed_range(u64 base_addr, u64 size)* region intersects with known resource. So do an allow list check for * IORES_DESCs that definitely or most likely not MMIO. */ -int non_mmio_desc[] = { +static const int non_mmio_desc[] = {IORES_DESC_CRASH_KERNEL ,IORES_DESC_ACPI_TABLES ,IORES_DESC_ACPI_NV_STORAGE , --
Applied as 6.20 material, thanks!