This is an automated email from the ASF dual-hosted git repository. xiaoxiang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git
commit a86c58334c0a8f8af34e2c0060ccef6d1b4bc0d2 Author: YAMAMOTO Takashi <yamam...@midokura.com> AuthorDate: Mon Nov 9 18:11:42 2020 +0900 arch/arm/src/lpc54xx/lpc54_allocateheap.c: Appease nxstyle --- arch/arm/src/lpc54xx/lpc54_allocateheap.c | 35 +++++++++++++++++++++---------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/arch/arm/src/lpc54xx/lpc54_allocateheap.c b/arch/arm/src/lpc54xx/lpc54_allocateheap.c index 6170071..71a99ea 100644 --- a/arch/arm/src/lpc54xx/lpc54_allocateheap.c +++ b/arch/arm/src/lpc54xx/lpc54_allocateheap.c @@ -60,7 +60,9 @@ /**************************************************************************** * Pre-processor Definitions ****************************************************************************/ + /* Configuration ************************************************************/ + /* Terminology. In the flat build (CONFIG_BUILD_FLAT=y), there is only a * single heap access with the standard allocations (malloc/free). This * heap is referred to as the user heap. In the protected build @@ -176,7 +178,8 @@ const uint32_t g_idle_topstack = (uint32_t)&_ebss + CONFIG_IDLETHREAD_STACKSIZE; * * Kernel .data region. Size determined at link time. * Kernel .bss region Size determined at link time. - * Kernel IDLE thread stack. Size determined by CONFIG_IDLETHREAD_STACKSIZE. + * Kernel IDLE thread stack. Size determined by + * CONFIG_IDLETHREAD_STACKSIZE. * Padding for alignment * User .data region. Size determined at link time. * User .bss region Size determined at link time. @@ -197,7 +200,8 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size) * of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment). */ - uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE; + uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + + CONFIG_MM_KERNEL_HEAPSIZE; size_t usize = CONFIG_RAM_END - ubase; DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END); @@ -236,7 +240,8 @@ void up_allocate_kheap(FAR void **heap_start, size_t *heap_size) * of CONFIG_MM_KERNEL_HEAPSIZE (subject to alignment). */ - uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + CONFIG_MM_KERNEL_HEAPSIZE; + uintptr_t ubase = (uintptr_t)USERSPACE->us_bssend + + CONFIG_MM_KERNEL_HEAPSIZE; DEBUGASSERT(ubase < (uintptr_t)CONFIG_RAM_END); /* Return the kernel heap settings (i.e., the part of the heap region @@ -269,7 +274,8 @@ void arm_addregion(void) { /* Add the SRAM to the user heap */ - heapstart = (FAR void *)(LPC54_SRAMCS0_BASE + CONFIG_LPC54_EMC_STATIC_CS0_OFFSET); + heapstart = (FAR void *)(LPC54_SRAMCS0_BASE + + CONFIG_LPC54_EMC_STATIC_CS0_OFFSET); heapsize = CONFIG_LPC54_EMC_STATIC_CS0_SIZE; kumm_addregion(heapstart, heapsize); @@ -287,7 +293,8 @@ void arm_addregion(void) { /* Add the SRAM to the user heap */ - heapstart = (FAR void *)(LPC54_SRAMCS1_BASE + CONFIG_LPC54_EMC_STATIC_CS1_OFFSET); + heapstart = (FAR void *)(LPC54_SRAMCS1_BASE + + CONFIG_LPC54_EMC_STATIC_CS1_OFFSET); heapsize = CONFIG_LPC54_EMC_STATIC_CS1_SIZE; kumm_addregion(heapstart, heapsize); @@ -305,7 +312,8 @@ void arm_addregion(void) { /* Add the SRAM to the user heap */ - heapstart = (FAR void *)(LPC54_SRAMCS2_BASE + CONFIG_LPC54_EMC_STATIC_CS2_OFFSET); + heapstart = (FAR void *)(LPC54_SRAMCS2_BASE + + CONFIG_LPC54_EMC_STATIC_CS2_OFFSET); heapsize = CONFIG_LPC54_EMC_STATIC_CS2_SIZE; kumm_addregion(heapstart, heapsize); @@ -323,7 +331,8 @@ void arm_addregion(void) { /* Add the SRAM to the user heap */ - heapstart = (FAR void *)(LPC54_SRAMCS3_BASE + CONFIG_LPC54_EMC_STATIC_CS3_OFFSET); + heapstart = (FAR void *)(LPC54_SRAMCS3_BASE + + CONFIG_LPC54_EMC_STATIC_CS3_OFFSET); heapsize = CONFIG_LPC54_EMC_STATIC_CS3_SIZE; kumm_addregion(heapstart, heapsize); @@ -341,7 +350,8 @@ void arm_addregion(void) { /* Add the SDRAM to the user heap */ - heapstart = (FAR void *)(LPC54_DRAMCS0_BASE + CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET); + heapstart = (FAR void *)(LPC54_DRAMCS0_BASE + + CONFIG_LPC54_EMC_DYNAMIC_CS0_OFFSET); heapsize = CONFIG_LPC54_EMC_DYNAMIC_CS0_SIZE; kumm_addregion(heapstart, heapsize); @@ -359,7 +369,8 @@ void arm_addregion(void) { /* Add the SDRAM to the user heap */ - heapstart = (FAR void *)(LPC54_DRAMCS1_BASE + CONFIG_LPC54_EMC_DYNAMIC_CS1_OFFSET); + heapstart = (FAR void *)(LPC54_DRAMCS1_BASE + + CONFIG_LPC54_EMC_DYNAMIC_CS1_OFFSET); heapsize = CONFIG_LPC54_EMC_DYNAMIC_CS1_SIZE; kumm_addregion(heapstart, heapsize); @@ -377,7 +388,8 @@ void arm_addregion(void) { /* Add the SDRAM to the user heap */ - heapstart = (FAR void *)(LPC54_DRAMCS2_BASE + CONFIG_LPC54_EMC_DYNAMIC_CS2_OFFSET); + heapstart = (FAR void *)(LPC54_DRAMCS2_BASE + + CONFIG_LPC54_EMC_DYNAMIC_CS2_OFFSET); heapsize = CONFIG_LPC54_EMC_DYNAMIC_CS2_SIZE; kumm_addregion(heapstart, heapsize); @@ -395,7 +407,8 @@ void arm_addregion(void) { /* Add the SDRAM to the user heap */ - heapstart = (FAR void *)(LPC54_DRAMCS3_BASE + CONFIG_LPC54_EMC_DYNAMIC_CS3_OFFSET); + heapstart = (FAR void *)(LPC54_DRAMCS3_BASE + + CONFIG_LPC54_EMC_DYNAMIC_CS3_OFFSET); heapsize = CONFIG_LPC54_EMC_DYNAMIC_CS3_SIZE; kumm_addregion(heapstart, heapsize);