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 b2cd6fb980929f853d60ecbf9a1dad4529805941
Author: Alin Jerpelea <[email protected]>
AuthorDate: Wed Mar 24 09:12:03 2021 +0100

    arch: arm: armv6-m: fix nxstyle errors
    
    Fix nxstyle errors to pass CI
    
    Signed-off-by: Alin Jerpelea <[email protected]>
---
 arch/arm/src/armv6-m/arm_exception.S          | 20 +++++------
 arch/arm/src/armv6-m/arm_fullcontextrestore.S | 28 +++++++--------
 arch/arm/src/armv6-m/arm_saveusercontext.S    | 28 +++++++--------
 arch/arm/src/armv6-m/arm_switchcontext.S      | 28 +++++++--------
 arch/arm/src/armv6-m/exc_return.h             | 50 ++++++++++++++-------------
 arch/arm/src/armv6-m/nvic.h                   | 36 +++++++++----------
 arch/arm/src/armv6-m/psr.h                    | 16 ++++-----
 arch/arm/src/armv6-m/svcall.h                 | 34 ++++++++++--------
 arch/arm/src/armv6-m/vfork.S                  | 24 ++++++-------
 9 files changed, 135 insertions(+), 129 deletions(-)

diff --git a/arch/arm/src/armv6-m/arm_exception.S 
b/arch/arm/src/armv6-m/arm_exception.S
index ecc6c04..392edbc 100644
--- a/arch/arm/src/armv6-m/arm_exception.S
+++ b/arch/arm/src/armv6-m/arm_exception.S
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/arm_exception.S
  *
  *   Copyright (C) 2013 Gregory Nutt. All rights reserved.
@@ -35,11 +35,11 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 
@@ -48,18 +48,18 @@
 
 #include "chip.h"
 
-/************************************************************************************
+/****************************************************************************
  * Public Symbols
- 
************************************************************************************/
+ ****************************************************************************/
 
        .globl          exception_common
 
        .cpu            cortex-m0
        .file           "arm_exception.S"
 
-/************************************************************************************
+/****************************************************************************
  * .text
- 
************************************************************************************/
+ ****************************************************************************/
 
 /* Common exception handling logic.  On entry here, the return stack is on 
either
  * the PSP or the MSP and looks like the following:
@@ -258,13 +258,13 @@ exception_common:
 
        .size   exception_common, .-exception_common
 
-/************************************************************************************
+/****************************************************************************
  *  Name: g_intstackalloc/g_intstackbase
  *
  * Description:
  *   Shouldn't happen
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
 #if CONFIG_ARCH_INTERRUPTSTACK > 3
        .bss
diff --git a/arch/arm/src/armv6-m/arm_fullcontextrestore.S 
b/arch/arm/src/armv6-m/arm_fullcontextrestore.S
index 5f49087..2974437 100644
--- a/arch/arm/src/armv6-m/arm_fullcontextrestore.S
+++ b/arch/arm/src/armv6-m/arm_fullcontextrestore.S
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/arm_fullcontextrestore.S
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,11 +16,11 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 #include <arch/irq.h>
@@ -28,26 +28,26 @@
 #include "nvic.h"
 #include "svcall.h"
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Symbols
- 
************************************************************************************/
+ ****************************************************************************/
 
        .cpu    cortex-m0
        .file   "arm_fullcontextrestore.S"
 
-/************************************************************************************
+/****************************************************************************
  * Macros
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Name: arm_fullcontextrestore
  *
  * Description:
@@ -58,7 +58,7 @@
  * Returned Value:
  *   None
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
        .align  2
        .code   16
diff --git a/arch/arm/src/armv6-m/arm_saveusercontext.S 
b/arch/arm/src/armv6-m/arm_saveusercontext.S
index 842788a..fb13851 100644
--- a/arch/arm/src/armv6-m/arm_saveusercontext.S
+++ b/arch/arm/src/armv6-m/arm_saveusercontext.S
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/arm_saveusercontext.S
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,11 +16,11 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 #include <arch/irq.h>
@@ -28,26 +28,26 @@
 #include "nvic.h"
 #include "svcall.h"
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Symbols
- 
************************************************************************************/
+ ****************************************************************************/
 
        .cpu    cortex-m0
        .file   "arm_saveusercontext.S"
 
-/************************************************************************************
+/****************************************************************************
  * Macros
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Name: arm_saveusercontext
  *
  * Description:
@@ -59,7 +59,7 @@
  *   0: Normal return
  *   1: Context switch return
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
        .text
        .align  2
diff --git a/arch/arm/src/armv6-m/arm_switchcontext.S 
b/arch/arm/src/armv6-m/arm_switchcontext.S
index 4181840..2833ec6 100644
--- a/arch/arm/src/armv6-m/arm_switchcontext.S
+++ b/arch/arm/src/armv6-m/arm_switchcontext.S
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/arm_switchcontext.S
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,11 +16,11 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 #include <arch/irq.h>
@@ -28,26 +28,26 @@
 #include "nvic.h"
 #include "svcall.h"
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Symbols
- 
************************************************************************************/
+ ****************************************************************************/
 
        .cpu    cortex-m0
        .file   "arm_switchcontext.S"
 
-/************************************************************************************
+/****************************************************************************
  * Macros
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Name: arm_switchcontext
  *
  * Description:
@@ -59,7 +59,7 @@
  * Returned Value:
  *   None
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
        .align  2
        .code   16
diff --git a/arch/arm/src/armv6-m/exc_return.h 
b/arch/arm/src/armv6-m/exc_return.h
index b9391a1..007cb22 100644
--- a/arch/arm/src/armv6-m/exc_return.h
+++ b/arch/arm/src/armv6-m/exc_return.h
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/exc_return.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,73 +16,75 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
 #ifndef __ARCH_ARM_SRC_ARMV6_M_EXC_RETURN_H
 #define __ARCH_ARM_SRC_ARMV6_M_EXC_RETURN_H
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
 /* The processor saves an EXC_RETURN value to the LR on exception entry. The
  * exception mechanism relies on this value to detect when the processor has
  * completed an exception handler.
  *
- * Bits [31:4] of an EXC_RETURN value are always 1.  When the processor loads a
- * value matching this pattern to the PC it detects that the operation is a not
- * a normal branch operation and instead, that the exception is complete.
+ * Bits [31:4] of an EXC_RETURN value are always 1.  When the processor loads
+ * a value matching this pattern to the PC it detects that the operation is a
+ * not a normal branch operation and instead, that the exception is complete.
  * Therefore, it starts the exception return sequence.
  *
- * Bits[3:0] of the EXC_RETURN value indicate the required return stack and 
eventual
- * processor mode.  The remaining bits of the EXC_RETURN value should be set 
to 1.
+ * Bits[3:0] of the EXC_RETURN value indicate the required return stack and
+ * eventual processor mode.
+ *
+ * The remaining bits of the EXC_RETURN value should be set to 1.
  */
 
 /* EXC_RETURN_BASE: Bits that are always set in an EXC_RETURN value. */
 
 #define EXC_RETURN_BASE          0xfffffff1
 
-/* EXC_RETURN_PROCESS_STACK: The exception saved (and will restore) the 
hardware
- * context using the process stack pointer (if not set, the context was saved
- * using the main stack pointer)
+/* EXC_RETURN_PROCESS_STACK: The exception saved (and will restore) the
+ * hardware context using the process stack pointer (if not set, the context
+ * was saved using the main stack pointer)
  */
 
 #define EXC_RETURN_PROCESS_BITNO (2)
 #define EXC_RETURN_PROCESS_STACK (1 << EXC_RETURN_PROCESS_BITNO)
 
-/* EXC_RETURN_THREAD_MODE: The exception will return to thread mode (if not 
set,
- * return stays in handler mode).
+/* EXC_RETURN_THREAD_MODE: The exception will return to thread mode
+ * (if not set, return stays in handler mode).
  */
 
 #define EXC_RETURN_THREAD_BITNO  (3)
 #define EXC_RETURN_THREAD_MODE   (1 << EXC_RETURN_THREAD_BITNO)
 
-/* EXC_RETURN_HANDLER: Return to handler mode. Exception return gets state from
- * the main stack. Execution uses MSP after return.
+/* EXC_RETURN_HANDLER: Return to handler mode. Exception return gets state
+ * from the main stack. Execution uses MSP after return.
  */
 
 #define EXC_RETURN_HANDLER       0xfffffff1
 
-/* EXC_RETURN_PRIVTHR: Return to privileged thread mode. Exception return gets
- * state from the main stack. Execution uses MSP after return.
+/* EXC_RETURN_PRIVTHR: Return to privileged thread mode. Exception return
+ * gets state from the main stack. Execution uses MSP after return.
  */
 
 #define EXC_RETURN_PRIVTHR       0xfffffff9
 
-/* EXC_RETURN_UNPRIVTHR: Return to unprivileged thread mode. Exception return 
gets
- * state from the process stack. Execution uses PSP after return.
+/* EXC_RETURN_UNPRIVTHR: Return to unprivileged thread mode. Exception return
+ * gets state from the process stack. Execution uses PSP after return.
  */
 
 #define EXC_RETURN_UNPRIVTHR     0xfffffffd
 
-/************************************************************************************
+/****************************************************************************
  * Inline Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
 #endif /* __ARCH_ARM_SRC_ARMV6_M_EXC_RETURN_H */
diff --git a/arch/arm/src/armv6-m/nvic.h b/arch/arm/src/armv6-m/nvic.h
index cfd1935..a26c7ed 100644
--- a/arch/arm/src/armv6-m/nvic.h
+++ b/arch/arm/src/armv6-m/nvic.h
@@ -1,4 +1,4 @@
-/****************************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/nvic.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,23 +16,23 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
****************************************************************************************************/
+ ****************************************************************************/
 
 #ifndef __ARCH_ARM_SRC_COMMON_ARMV6_M_NVIC_H
 #define __ARCH_ARM_SRC_COMMON_ARMV6_M_NVIC_H
 
-/****************************************************************************************************
+/****************************************************************************
  * Included Files
- 
****************************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 #include <nuttx/compiler.h>
 
-/****************************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
****************************************************************************************************/
+ ****************************************************************************/
 
-/* Base addresses 
***********************************************************************************/
+/* Base addresses ***********************************************************/
 
 #define ARMV6M_SYSCON1_BASE            0xe000e008 /* 0xe000e008-0xe000e00f 
System Control Block */
                                                   /* 0xe000e010-0xe000e01f 
Reserved */
@@ -41,7 +41,7 @@
 #define ARMV6M_SYSCON2_BASE            0xe000ed00 /* 0xe000ed00-0xe000ed3f 
System Control Block */
 #define ARMV6M_NVIC2_BASE              0xe000ef00 /* 0xe000ef00-0xe000ef03 
Nested Vectored Interrupt Controller */
 
-/* NVIC register offsets 
****************************************************************************/
+/* NVIC register offsets ****************************************************/
 
 /* NVIC register offsets (all relative to ARMV6M_NVIC1_BASE) */
 
@@ -77,7 +77,7 @@
 #define ARMV6M_SYSTICK_CVR_OFFSET      0x0008  /* SysTick current value 
register */
 #define ARMV6M_SYSTICK_CALIB_OFFSET    0x000c  /* SysTick calibration value 
register */
 
-/* Register addresses 
*******************************************************************************/
+/* Register addresses *******************************************************/
 
 /* NVIC register addresses */
 
@@ -113,7 +113,7 @@
 #define ARMV6M_SYSTICK_CVR             
(ARMV6M_SYSTICK_BASE+ARMV6M_SYSTICK_CVR_OFFSET)
 #define ARMV6M_SYSTICK_CALIB           
(ARMV6M_SYSTICK_BASE+ARMV6M_SYSTICK_CALIB_OFFSET)
 
-/* Register bit definitions 
*************************************************************************/
+/* Register bit definitions *************************************************/
 
 /* Interrupt set-enable register */
 
@@ -347,13 +347,13 @@
 #define SYSTICK_CALIB_SKEW             (1 << 30) /* Bit 30: TENMS value is 
exact */
 #define SYSTICK_CALIB_NOREF            (1 << 31) /* Bit 31: Device provides a 
reference clock */
 
-/****************************************************************************************************
+/****************************************************************************
  * Public Types
- 
****************************************************************************************************/
+ ****************************************************************************/
 
-/****************************************************************************************************
+/****************************************************************************
  * Public Data
- 
****************************************************************************************************/
+ ****************************************************************************/
 
 #ifndef __ASSEMBLY__
 #undef EXTERN
@@ -365,17 +365,17 @@ extern "C"
 #define EXTERN extern
 #endif
 
-/****************************************************************************************************
+/****************************************************************************
  * Public Function Prototypes
- 
****************************************************************************************************/
+ ****************************************************************************/
 
-/****************************************************************************************************
+/****************************************************************************
  * Function:  arm_dumpnvic
  *
  * Description:
  *   Dump all NVIC and SYSCON registers along with a user message.
  *
- 
****************************************************************************************************/
+ ****************************************************************************/
 
 #ifdef CONFIG_DEBUG_FEATURES
 void arm_dumpnvic(FAR const char *msg);
diff --git a/arch/arm/src/armv6-m/psr.h b/arch/arm/src/armv6-m/psr.h
index ea08383..71c4347 100644
--- a/arch/arm/src/armv6-m/psr.h
+++ b/arch/arm/src/armv6-m/psr.h
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/psr.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,18 +16,18 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
 #ifndef __ARCH_ARM_SRC_COMMON_ARMV6_M_PSR_H
 #define __ARCH_ARM_SRC_COMMON_ARMV6_M_PSR_H
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
 /* Application Program Status Register (APSR) */
 
@@ -55,8 +55,8 @@
 #define ARMV6M_XPSR_Z            ARMV6M_APSR_Z
 #define ARMV6M_XPSR_N            ARMV6M_APSR_N
 
-/************************************************************************************
+/****************************************************************************
  * Inline Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
 #endif /* __ARCH_ARM_SRC_COMMON_ARMV6_M_PSR_H */
diff --git a/arch/arm/src/armv6-m/svcall.h b/arch/arm/src/armv6-m/svcall.h
index 5441a45..74dff16 100644
--- a/arch/arm/src/armv6-m/svcall.h
+++ b/arch/arm/src/armv6-m/svcall.h
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/svcall.h
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,14 +16,14 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
 #ifndef __ARCH_ARM_SRC_ARMV6_M_SVCALL_H
 #define __ARCH_ARM_SRC_ARMV6_M_SVCALL_H
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 
@@ -31,15 +31,17 @@
 #  include <syscall.h>
 #endif
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/* Configuration 
********************************************************************/
+/* Configuration ************************************************************/
 
-/* This logic uses three system calls {0,1,2} for context switching and one 
for the
- * syscall return.  So a minimum of four syscall values must be reserved.  If
- * CONFIG_BUILD_PROTECTED is defined, then four more syscall values must be 
reserved.
+/* This logic uses three system calls {0,1,2} for context switching and one
+ * for the syscall return.
+ * So a minimum of four syscall values must be reserved.
+ * If CONFIG_BUILD_PROTECTED is defined, then four more syscall values must
+ * be reserved.
  */
 
 #ifdef CONFIG_LIB_SYSCALL
@@ -58,7 +60,7 @@
 #  endif
 #endif
 
-/* Cortex M0 system calls 
***********************************************************/
+/* Cortex M0 system calls ***************************************************/
 
 /* SYS call 0:
  *
@@ -100,7 +102,8 @@
 
 /* SYS call 5:
  *
- * void up_pthread_start(pthread_startroutine_t entrypt, pthread_addr_t arg)
+ * void up_pthread_start(pthread_startroutine_t entrypt,
+ *                       pthread_addr_t arg)
  *        noreturn_function
  */
 
@@ -108,7 +111,8 @@
 
 /* SYS call 6:
  *
- * void signal_handler(_sa_sigaction_t sighand, int signo, FAR siginfo_t *info,
+ * void signal_handler(_sa_sigaction_t sighand, int signo,
+ *                     FAR siginfo_t *info,
  *                     FAR void *ucontext);
  */
 
@@ -124,8 +128,8 @@
 #endif /* CONFIG_BUILD_PROTECTED */
 #endif /* CONFIG_LIB_SYSCALL */
 
-/************************************************************************************
+/****************************************************************************
  * Inline Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
 #endif /* __ARCH_ARM_SRC_ARMV6_M_SVCALL_H */
diff --git a/arch/arm/src/armv6-m/vfork.S b/arch/arm/src/armv6-m/vfork.S
index e67b350..00cddf5 100644
--- a/arch/arm/src/armv6-m/vfork.S
+++ b/arch/arm/src/armv6-m/vfork.S
@@ -1,4 +1,4 @@
-/************************************************************************************
+/****************************************************************************
  * arch/arm/src/armv6-m/vfork.S
  *
  * Licensed to the Apache Software Foundation (ASF) under one or more
@@ -16,33 +16,33 @@
  * License for the specific language governing permissions and limitations
  * under the License.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Included Files
- 
************************************************************************************/
+ ****************************************************************************/
 
 #include <nuttx/config.h>
 
 #include "arm_vfork.h"
 
-/************************************************************************************
+/****************************************************************************
  * Pre-processor Definitions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Public Symbols
- 
************************************************************************************/
+ ****************************************************************************/
 
        .cpu    cortex-m0
        .file   "vfork.S"
        .globl  up_vfork
 
-/************************************************************************************
+/****************************************************************************
  * Public Functions
- 
************************************************************************************/
+ ****************************************************************************/
 
-/************************************************************************************
+/****************************************************************************
  * Name: vfork
  *
  * Description:
@@ -81,7 +81,7 @@
  *   returned to the parent, no child process is created, and errno is set to
  *   indicate the error.
  *
- 
************************************************************************************/
+ ****************************************************************************/
 
        .align  2
        .code   16

Reply via email to