Skip to content

Commit

Permalink
arch: arm: mpu: minor comment style fixes
Browse files Browse the repository at this point in the history
This commit fixes some minor function documentation issues
and comments' style in the NXP_MPU driver.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
  • Loading branch information
ioannisg authored and nashif committed May 31, 2018
1 parent 7f64367 commit e76ef30
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion arch/arm/core/cortex_m/mpu/arm_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ static inline u8_t _get_num_regions(void)
/* This internal function performs MPU region initialization.
*
* Note:
* The caller is responsible to supply a valid region index.
* The caller must provide a valid region index.
*/
static void _region_init(u32_t index, u32_t region_addr,
u32_t region_attr)
Expand Down
10 changes: 5 additions & 5 deletions arch/arm/core/cortex_m/mpu/nxp_mpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,15 @@ static inline u32_t _get_region_index_by_type(u32_t type)
}

/**
* This internal function check if region is enabled or not
* This internal function checks if region is enabled or not.
*/
static inline int _is_enabled_region(u32_t r_index)
{
return SYSMPU->WORD[r_index][3] & SYSMPU_WORD_VLD_MASK;
}

/**
* This internal function check if the given buffer in in the region
* This internal function checks if the given buffer is in the region.
*/
static inline int _is_in_region(u32_t r_index, u32_t start, u32_t size)
{
Expand All @@ -146,7 +146,7 @@ static inline int _is_in_region(u32_t r_index, u32_t start, u32_t size)
}

/**
* This internal function check if the region is user accessible or not
* This internal function checks if the region is user accessible or not.
*/
static inline int _is_user_accessible_region(u32_t r_index, int write)
{
Expand All @@ -170,7 +170,7 @@ static void nxp_mpu_setup_sram_region(u32_t base, u32_t size)

/*
* The NXP MPU manages the permissions of the overlapping regions
* doing the logic OR in between them, hence they can't be used
* doing the logical OR in between them, hence they can't be used
* for stack/stack guard protection. For this reason the last region of
* the MPU will be reserved.
*
Expand Down Expand Up @@ -407,7 +407,7 @@ int arm_core_mpu_buffer_validate(void *addr, size_t size, int write)
{
u32_t r_index;

/* Iterate all mpu regions */
/* Iterate all MPU regions */
for (r_index = 0; r_index < _get_num_regions(); r_index++) {
if (!_is_enabled_region(r_index) ||
!_is_in_region(r_index, (u32_t)addr, size)) {
Expand Down

0 comments on commit e76ef30

Please sign in to comment.