You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by pk...@apache.org on 2022/04/17 15:42:47 UTC

[incubator-nuttx] 02/08: arch/ceva: Remove FAR from chip folder

This is an automated email from the ASF dual-hosted git repository.

pkarashchenko pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git

commit e923875c1b938847c2c8e3a8f02b7c39df9e6cde
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Sun Apr 17 20:37:48 2022 +0800

    arch/ceva: Remove FAR from chip folder
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/ceva/include/syscall.h                 |  4 ++--
 arch/ceva/include/xc5/irq.h                 |  2 +-
 arch/ceva/include/xm6/irq.h                 |  2 +-
 arch/ceva/include/xm6/spinlock.h            |  2 +-
 arch/ceva/src/common/up_assert.c            |  6 +++---
 arch/ceva/src/common/up_checkstack.c        | 10 +++++-----
 arch/ceva/src/common/up_createstack.c       |  4 ++--
 arch/ceva/src/common/up_heap.c              |  4 ++--
 arch/ceva/src/common/up_internal.h          |  6 +++---
 arch/ceva/src/common/up_releasestack.c      |  2 +-
 arch/ceva/src/common/up_schedulesigaction.c |  4 ++--
 arch/ceva/src/common/up_signal_dispatch.c   |  2 +-
 arch/ceva/src/common/up_stackframe.c        |  6 +++---
 arch/ceva/src/common/up_svcall.c            |  8 ++++----
 arch/ceva/src/common/up_task_start.c        |  2 +-
 arch/ceva/src/common/up_usestack.c          |  2 +-
 arch/ceva/src/common/up_vfork.c             |  4 ++--
 arch/ceva/src/xc5/up_hardfault.c            |  2 +-
 arch/ceva/src/xm6/up_hardfault.c            |  2 +-
 19 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/arch/ceva/include/syscall.h b/arch/ceva/include/syscall.h
index 7fc3c672b2..876d349e2d 100644
--- a/arch/ceva/include/syscall.h
+++ b/arch/ceva/include/syscall.h
@@ -89,7 +89,7 @@
 #ifndef CONFIG_BUILD_FLAT
 /* SYS call 4:
  *
- * void up_task_start(main_t taskentry, int argc, FAR char *argv[])
+ * void up_task_start(main_t taskentry, int argc, char *argv[])
  *        noreturn_function;
  */
 
@@ -106,7 +106,7 @@
 /* SYS call 6:
  *
  * void signal_handler(_sa_sigaction_t sighand, int signo,
- *                     FAR siginfo_t *info, FAR void *ucontext);
+ *                     siginfo_t *info, void *ucontext);
  */
 
 #define SYS_signal_handler        0x06
diff --git a/arch/ceva/include/xc5/irq.h b/arch/ceva/include/xc5/irq.h
index e086774f1e..7c40b8d413 100644
--- a/arch/ceva/include/xc5/irq.h
+++ b/arch/ceva/include/xc5/irq.h
@@ -131,7 +131,7 @@ struct xcptcontext
    * are pending signals to be processed.
    */
 
-  FAR void *sigdeliver; /* Actual type is sig_deliver_t */
+  void *sigdeliver; /* Actual type is sig_deliver_t */
 
   /* These are saved copies of the context used during
    * signal processing.
diff --git a/arch/ceva/include/xm6/irq.h b/arch/ceva/include/xm6/irq.h
index 69a73b19d7..41101a626d 100644
--- a/arch/ceva/include/xm6/irq.h
+++ b/arch/ceva/include/xm6/irq.h
@@ -134,7 +134,7 @@ struct xcptcontext
    * are pending signals to be processed.
    */
 
-  FAR void *sigdeliver; /* Actual type is sig_deliver_t */
+  void *sigdeliver; /* Actual type is sig_deliver_t */
 
   /* These are saved copies of the context used during
    * signal processing.
diff --git a/arch/ceva/include/xm6/spinlock.h b/arch/ceva/include/xm6/spinlock.h
index ed48770643..2080689f2e 100644
--- a/arch/ceva/include/xm6/spinlock.h
+++ b/arch/ceva/include/xm6/spinlock.h
@@ -95,7 +95,7 @@ static inline void up_dmb(void)
  *
  ****************************************************************************/
 
-static inline spinlock_t up_testset(volatile FAR spinlock_t *lock)
+static inline spinlock_t up_testset(volatile spinlock_t *lock)
 {
   irqstate_t flags;
   spinlock_t old;
diff --git a/arch/ceva/src/common/up_assert.c b/arch/ceva/src/common/up_assert.c
index c5a5d233a5..a587fe9279 100644
--- a/arch/ceva/src/common/up_assert.c
+++ b/arch/ceva/src/common/up_assert.c
@@ -87,7 +87,7 @@ static void up_stackdump(uint32_t sp, uint32_t stack_base)
  ****************************************************************************/
 
 #ifdef CONFIG_STACK_COLORATION
-static void up_taskdump(FAR struct tcb_s *tcb, FAR void *arg)
+static void up_taskdump(struct tcb_s *tcb, void *arg)
 {
   /* Dump interesting properties of this task */
 
@@ -156,7 +156,7 @@ static inline void up_registerdump(void)
  ****************************************************************************/
 
 #ifdef CONFIG_ARCH_USBDUMP
-static int usbtrace_syslog(FAR const char *fmt, ...)
+static int usbtrace_syslog(const char *fmt, ...)
 {
   va_list ap;
 
@@ -168,7 +168,7 @@ static int usbtrace_syslog(FAR const char *fmt, ...)
   return 0;
 }
 
-static int assert_tracecallback(FAR struct usbtrace_s *trace, FAR void *arg)
+static int assert_tracecallback(struct usbtrace_s *trace, void *arg)
 {
   usbtrace_trprintf(usbtrace_syslog, trace->event, trace->value);
   return 0;
diff --git a/arch/ceva/src/common/up_checkstack.c b/arch/ceva/src/common/up_checkstack.c
index c3f5c782b3..e58c20c917 100644
--- a/arch/ceva/src/common/up_checkstack.c
+++ b/arch/ceva/src/common/up_checkstack.c
@@ -59,7 +59,7 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size);
 
 static size_t do_stackcheck(uintptr_t alloc, size_t size)
 {
-  FAR uint32_t *ptr;
+  uint32_t *ptr;
   size_t nwords;
   size_t mark;
 
@@ -71,7 +71,7 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size)
    * that does not have the magic value is the high water mark.
    */
 
-  for (ptr = (FAR uint32_t *)alloc, mark = nwords;
+  for (ptr = (uint32_t *)alloc, mark = nwords;
        *ptr == STACK_COLOR && mark > 0;
        ptr++, mark--);
 
@@ -91,7 +91,7 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size)
       int i;
       int j;
 
-      ptr = (FAR uint32_t *)start;
+      ptr = (uint32_t *)start;
       for (i = 0; i < nwords; i += 64)
         {
           for (j = 0; j < 64; j++)
@@ -139,13 +139,13 @@ static size_t do_stackcheck(uintptr_t alloc, size_t size)
  *
  ****************************************************************************/
 
-size_t up_check_tcbstack(FAR struct tcb_s *tcb)
+size_t up_check_tcbstack(struct tcb_s *tcb)
 {
   return do_stackcheck((uintptr_t)tcb->stack_alloc_ptr,
                        tcb->adj_stack_size);
 }
 
-ssize_t up_check_tcbstack_remain(FAR struct tcb_s *tcb)
+ssize_t up_check_tcbstack_remain(struct tcb_s *tcb)
 {
   return tcb->adj_stack_size - up_check_tcbstack(tcb);
 }
diff --git a/arch/ceva/src/common/up_createstack.c b/arch/ceva/src/common/up_createstack.c
index 1f4eacd886..f2e9a6fdf3 100644
--- a/arch/ceva/src/common/up_createstack.c
+++ b/arch/ceva/src/common/up_createstack.c
@@ -89,7 +89,7 @@
  *
  ****************************************************************************/
 
-int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
+int up_create_stack(struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 {
 #ifdef CONFIG_TLS
   /* The allocated stack size must not exceed the maximum possible for the
@@ -228,7 +228,7 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
  ****************************************************************************/
 
 #ifdef CONFIG_STACK_COLORATION
-void up_stack_color(FAR void *stackbase, size_t nbytes)
+void up_stack_color(void *stackbase, size_t nbytes)
 {
   uint32_t *stkptr;
   uintptr_t stkend;
diff --git a/arch/ceva/src/common/up_heap.c b/arch/ceva/src/common/up_heap.c
index 20c2fb39c3..53cd4b5cca 100644
--- a/arch/ceva/src/common/up_heap.c
+++ b/arch/ceva/src/common/up_heap.c
@@ -171,7 +171,7 @@ void *g_idle_topstack  = _START_HEAP;
  *
  ****************************************************************************/
 
-void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
+void up_allocate_heap(void **heap_start, size_t *heap_size)
 {
   int i;
 
@@ -240,7 +240,7 @@ void up_allocate_heap(FAR void **heap_start, size_t *heap_size)
  ****************************************************************************/
 
 #ifdef CONFIG_MM_KERNEL_HEAP
-void up_allocate_kheap(FAR void **heap_start, size_t *heap_size)
+void up_allocate_kheap(void **heap_start, size_t *heap_size)
 {
   int i;
 
diff --git a/arch/ceva/src/common/up_internal.h b/arch/ceva/src/common/up_internal.h
index 2e14a40005..dceb52b1c3 100644
--- a/arch/ceva/src/common/up_internal.h
+++ b/arch/ceva/src/common/up_internal.h
@@ -266,8 +266,8 @@ uint32_t *up_doirq(int irq, uint32_t *regs);
 
 /* Exception Handlers */
 
-int  up_svcall(int irq, FAR void *context, FAR void *arg);
-int  up_hardfault(int irq, FAR void *context, FAR void *arg);
+int  up_svcall(int irq, void *context, void *arg);
+int  up_hardfault(int irq, void *context, void *arg);
 
 void up_svcall_handler(void);
 
@@ -325,7 +325,7 @@ void up_usbuninitialize(void);
 #endif
 
 #ifdef CONFIG_STACK_COLORATION
-void up_stack_color(FAR void *stackbase, size_t nbytes);
+void up_stack_color(void *stackbase, size_t nbytes);
 #endif
 
 #undef EXTERN
diff --git a/arch/ceva/src/common/up_releasestack.c b/arch/ceva/src/common/up_releasestack.c
index a58939c8a6..509ba49b4b 100644
--- a/arch/ceva/src/common/up_releasestack.c
+++ b/arch/ceva/src/common/up_releasestack.c
@@ -79,7 +79,7 @@
  *
  ****************************************************************************/
 
-void up_release_stack(FAR struct tcb_s *dtcb, uint8_t ttype)
+void up_release_stack(struct tcb_s *dtcb, uint8_t ttype)
 {
   /* Is there a stack allocated? */
 
diff --git a/arch/ceva/src/common/up_schedulesigaction.c b/arch/ceva/src/common/up_schedulesigaction.c
index d2129bb9c7..13bb89983b 100644
--- a/arch/ceva/src/common/up_schedulesigaction.c
+++ b/arch/ceva/src/common/up_schedulesigaction.c
@@ -141,7 +141,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
               /* Save the current register context location */
 
               tcb->xcp.saved_regs = g_current_regs[cpu];
-              tcb->xcp.sigdeliver = (FAR void *)sigdeliver;
+              tcb->xcp.sigdeliver = (void *)sigdeliver;
 
               /* Duplicate the register context.  These will be
                * restored by the signal trampoline after the signal has been
@@ -186,7 +186,7 @@ void up_schedule_sigaction(struct tcb_s *tcb, sig_deliver_t sigdeliver)
           /* Save the current register context location */
 
           tcb->xcp.saved_regs = tcb->xcp.regs;
-          tcb->xcp.sigdeliver = (FAR void *)sigdeliver;
+          tcb->xcp.sigdeliver = (void *)sigdeliver;
 
           /* Duplicate the register context.  These will be restored
            * by the signal trampoline after the signal has been delivered.
diff --git a/arch/ceva/src/common/up_signal_dispatch.c b/arch/ceva/src/common/up_signal_dispatch.c
index 9f6e709b21..4a3d345a64 100644
--- a/arch/ceva/src/common/up_signal_dispatch.c
+++ b/arch/ceva/src/common/up_signal_dispatch.c
@@ -64,7 +64,7 @@
  ****************************************************************************/
 
 void up_signal_dispatch(_sa_sigaction_t sighand, int signo,
-                        FAR siginfo_t *info, FAR void *ucontext)
+                        siginfo_t *info, void *ucontext)
 {
   /* Let sys_call4() do all of the work */
 
diff --git a/arch/ceva/src/common/up_stackframe.c b/arch/ceva/src/common/up_stackframe.c
index 9c142b4711..4f598f638e 100644
--- a/arch/ceva/src/common/up_stackframe.c
+++ b/arch/ceva/src/common/up_stackframe.c
@@ -65,9 +65,9 @@
  *
  ****************************************************************************/
 
-FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
+void *up_stack_frame(struct tcb_s *tcb, size_t frame_size)
 {
-  FAR void *ret;
+  void *ret;
 
   /* Align the frame_size */
 
@@ -87,7 +87,7 @@ FAR void *up_stack_frame(FAR struct tcb_s *tcb, size_t frame_size)
 
   /* Save the adjusted stack values in the struct tcb_s */
 
-  tcb->stack_base_ptr  = (FAR uint8_t *)tcb->stack_base_ptr + frame_size;
+  tcb->stack_base_ptr  = (uint8_t *)tcb->stack_base_ptr + frame_size;
   tcb->adj_stack_size -= frame_size;
 
   /* And return the pointer to the allocated region */
diff --git a/arch/ceva/src/common/up_svcall.c b/arch/ceva/src/common/up_svcall.c
index 1635bdbac3..ad4e8a6d0d 100644
--- a/arch/ceva/src/common/up_svcall.c
+++ b/arch/ceva/src/common/up_svcall.c
@@ -47,7 +47,7 @@
  *
  ****************************************************************************/
 
-int up_svcall(int irq, FAR void *context, FAR void *arg)
+int up_svcall(int irq, void *context, void *arg)
 {
   uint32_t *regs = (uint32_t *)context;
   uint32_t cmd;
@@ -192,7 +192,7 @@ int up_svcall(int irq, FAR void *context, FAR void *arg)
 
       /* A0=SYS_task_start:  This a user task start
        *
-       *   void up_task_start(main_t taskentry, int argc, FAR char *argv[]);
+       *   void up_task_start(main_t taskentry, int argc, char *argv[]);
        *
        * At this point, the following values are saved in context:
        *
@@ -264,7 +264,7 @@ int up_svcall(int irq, FAR void *context, FAR void *arg)
       /* A0=SYS_signal_handler:  This a user signal handler callback
        *
        * void signal_handler(_sa_sigaction_t sighand, int signo,
-       *                     FAR siginfo_t *info, FAR void *ucontext);
+       *                     siginfo_t *info, void *ucontext);
        *
        * At this point, the following values are saved in context:
        *
@@ -343,7 +343,7 @@ int up_svcall(int irq, FAR void *context, FAR void *arg)
       default:
         {
 #ifdef CONFIG_LIB_SYSCALL
-          FAR struct tcb_s *rtcb = sched_self();
+          struct tcb_s *rtcb = sched_self();
           int index = rtcb->xcp.nsyscalls;
 
           /* Verify that the SYS call number is within range */
diff --git a/arch/ceva/src/common/up_task_start.c b/arch/ceva/src/common/up_task_start.c
index 11bf102baa..5a0bf81ea0 100644
--- a/arch/ceva/src/common/up_task_start.c
+++ b/arch/ceva/src/common/up_task_start.c
@@ -58,7 +58,7 @@
  *
  ****************************************************************************/
 
-void up_task_start(main_t taskentry, int argc, FAR char *argv[])
+void up_task_start(main_t taskentry, int argc, char *argv[])
 {
   /* Let sys_call3() do all of the work */
 
diff --git a/arch/ceva/src/common/up_usestack.c b/arch/ceva/src/common/up_usestack.c
index 0be0d51353..b6f4774311 100644
--- a/arch/ceva/src/common/up_usestack.c
+++ b/arch/ceva/src/common/up_usestack.c
@@ -64,7 +64,7 @@
  *
  ****************************************************************************/
 
-int up_use_stack(FAR struct tcb_s *tcb, FAR void *stack, size_t stack_size)
+int up_use_stack(struct tcb_s *tcb, void *stack, size_t stack_size)
 {
   uintptr_t top_of_stack;
   size_t size_of_stack;
diff --git a/arch/ceva/src/common/up_vfork.c b/arch/ceva/src/common/up_vfork.c
index b57ba8db25..8dd33a25e9 100644
--- a/arch/ceva/src/common/up_vfork.c
+++ b/arch/ceva/src/common/up_vfork.c
@@ -111,7 +111,7 @@ pid_t up_vfork(const uint32_t *regs)
 
   /* Allocate the stack for the TCB */
 
-  ret = up_create_stack((FAR struct tcb_s *)child, stacksize + argsize,
+  ret = up_create_stack((struct tcb_s *)child, stacksize + argsize,
                         parent->flags & TCB_FLAG_TTYPE_MASK);
   if (ret != OK)
     {
@@ -122,7 +122,7 @@ pid_t up_vfork(const uint32_t *regs)
 
   /* Allocate the memory and copy argument from parent task */
 
-  argv = up_stack_frame((FAR struct tcb_s *)child, argsize);
+  argv = up_stack_frame((struct tcb_s *)child, argsize);
   memcpy(argv, parent->stack_base_ptr, argsize);
 
   /* How much of the parent's stack was utilized?  The CEVA uses
diff --git a/arch/ceva/src/xc5/up_hardfault.c b/arch/ceva/src/xc5/up_hardfault.c
index e944109a7d..82e15f9164 100644
--- a/arch/ceva/src/xc5/up_hardfault.c
+++ b/arch/ceva/src/xc5/up_hardfault.c
@@ -80,7 +80,7 @@
  *
  ****************************************************************************/
 
-int up_hardfault(int irq, FAR void *context, FAR void *arg)
+int up_hardfault(int irq, void *context, void *arg)
 {
   /* Dump some hard fault info */
 
diff --git a/arch/ceva/src/xm6/up_hardfault.c b/arch/ceva/src/xm6/up_hardfault.c
index 367b2f16ec..a20f8890fe 100644
--- a/arch/ceva/src/xm6/up_hardfault.c
+++ b/arch/ceva/src/xm6/up_hardfault.c
@@ -95,7 +95,7 @@
  *
  ****************************************************************************/
 
-int up_hardfault(int irq, FAR void *context, FAR void *arg)
+int up_hardfault(int irq, void *context, void *arg)
 {
   /* Dump some hard fault info */