arch: arm: mpu: declare and define arm_mpu_config as const

Declare and define arm_mpu_config and arm_mpu_regions
structs as const, as they are not modified in run-time.

Fixes #10320

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
This commit is contained in:
Ioannis Glaropoulos 2018-11-21 09:09:17 +01:00 committed by Anas Nashif
commit 8204ecbead
9 changed files with 16 additions and 16 deletions

View file

@ -12,7 +12,7 @@
/* SoC Private Peripheral Bus */
#define PPB_BASE 0xE0000000
static struct arm_mpu_region mpu_regions[] = {
static const struct arm_mpu_region mpu_regions[] = {
/* Region 0 */
MPU_REGION_ENTRY("FLASH_0",
CONFIG_FLASH_BASE_ADDRESS,
@ -27,7 +27,7 @@ static struct arm_mpu_region mpu_regions[] = {
REGION_RAM_ATTR(REGION_SRAM_1_SIZE)),
};
struct arm_mpu_config mpu_config = {
const struct arm_mpu_config mpu_config = {
.num_regions = ARRAY_SIZE(mpu_regions),
.mpu_regions = mpu_regions,
};