You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by ac...@apache.org on 2020/05/01 13:43:56 UTC

[incubator-nuttx] 03/03: Fix nxstyle issue

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

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

commit f8a809eb5b830eab1ddf872436d8ff744b16f107
Author: Xiang Xiao <xi...@xiaomi.com>
AuthorDate: Fri May 1 02:43:08 2020 +0800

    Fix nxstyle issue
    
    Signed-off-by: Xiang Xiao <xi...@xiaomi.com>
---
 arch/hc/src/common/up_createstack.c          |  4 ++--
 arch/misoc/src/lm32/lm32_createstack.c       |  2 +-
 arch/misoc/src/minerva/minerva_createstack.c |  6 +++---
 arch/or1k/src/common/up_createstack.c        | 26 ++++++++++++++------------
 arch/renesas/src/common/up_createstack.c     |  4 ++--
 arch/x86/src/i486/up_createstack.c           |  4 ++--
 drivers/input/button_lower.c                 |  3 ++-
 drivers/leds/userled_lower.c                 |  6 ++++--
 fs/vfs/fs_fdopen.c                           |  4 ++--
 include/aio.h                                |  3 +++
 include/errno.h                              | 24 +++++++++++++-----------
 include/nuttx/clock.h                        |  2 +-
 include/nuttx/lib/builtin.h                  |  2 +-
 include/nuttx/sched.h                        |  2 +-
 include/nuttx/userspace.h                    | 12 ++++++++----
 include/stdio.h                              |  4 +++-
 libs/libc/libc.h                             | 12 ++++++------
 libs/libc/stdio/lib_libdtoa.c                |  6 ++++--
 libs/libc/unistd/lib_sethostname.c           |  4 ++--
 libs/libnx/nxcontext.h                       | 23 +++++++++++------------
 mm/umm_heap/umm_heap.h                       |  8 ++------
 sched/group/group_create.c                   | 12 ++++++------
 22 files changed, 93 insertions(+), 80 deletions(-)

diff --git a/arch/hc/src/common/up_createstack.c b/arch/hc/src/common/up_createstack.c
index d9aa7f7..e0948f9 100644
--- a/arch/hc/src/common/up_createstack.c
+++ b/arch/hc/src/common/up_createstack.c
@@ -182,12 +182,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 
       /* Save the adjusted stack values in the struct tcb_s */
 
-      tcb->adj_stack_ptr  = (uint32_t*)top_of_stack;
+      tcb->adj_stack_ptr  = (uint32_t *)top_of_stack;
       tcb->adj_stack_size = size_of_stack;
 
       board_autoled_on(LED_STACKCREATED);
       return OK;
     }
 
-   return ERROR;
+  return ERROR;
 }
diff --git a/arch/misoc/src/lm32/lm32_createstack.c b/arch/misoc/src/lm32/lm32_createstack.c
index 7da441f..12da119 100644
--- a/arch/misoc/src/lm32/lm32_createstack.c
+++ b/arch/misoc/src/lm32/lm32_createstack.c
@@ -210,5 +210,5 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
       return OK;
     }
 
-   return ERROR;
+  return ERROR;
 }
diff --git a/arch/misoc/src/minerva/minerva_createstack.c b/arch/misoc/src/minerva/minerva_createstack.c
index dbe6aec..c9d26ad 100644
--- a/arch/misoc/src/minerva/minerva_createstack.c
+++ b/arch/misoc/src/minerva/minerva_createstack.c
@@ -185,9 +185,9 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
       top_of_stack = (uint32_t) tcb->stack_alloc_ptr + stack_size - 4;
 
       /* The MINERVA stack must be aligned at word (4 byte) boundaries; for
-       * floating point use, the stack must be aligned to 8-byte addresses. If
-       * necessary top_of_stack must be rounded down to the next boundary to
-       * meet these alignment requirements.
+       * floating point use, the stack must be aligned to 8-byte addresses.
+       * If necessary top_of_stack must be rounded down to the next boundary
+       * to meet these alignment requirements.
        */
 
       top_of_stack = STACK_ALIGN_DOWN(top_of_stack);
diff --git a/arch/or1k/src/common/up_createstack.c b/arch/or1k/src/common/up_createstack.c
index 1775a60..78cfee2 100644
--- a/arch/or1k/src/common/up_createstack.c
+++ b/arch/or1k/src/common/up_createstack.c
@@ -118,19 +118,19 @@
 int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 {
 #ifdef CONFIG_TLS
-   /* Add the size of the TLS information structure */
+  /* Add the size of the TLS information structure */
 
-   stack_size += sizeof(struct tls_info_s);
+  stack_size += sizeof(struct tls_info_s);
 
-   /* The allocated stack size must not exceed the maximum possible for the
-    * TLS feature.
-    */
+  /* The allocated stack size must not exceed the maximum possible for the
+   * TLS feature.
+   */
 
-   DEBUGASSERT(stack_size <= TLS_MAXSTACK);
-   if (stack_size >= TLS_MAXSTACK)
-     {
-       stack_size = TLS_MAXSTACK;
-     }
+  DEBUGASSERT(stack_size <= TLS_MAXSTACK);
+  if (stack_size >= TLS_MAXSTACK)
+    {
+      stack_size = TLS_MAXSTACK;
+    }
 #endif
 
   /* Is there already a stack allocated of a different size?  Because of
@@ -229,8 +229,10 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
        * water marks.
        */
 
-      stack_base = (uintptr_t)tcb->stack_alloc_ptr + sizeof(struct tls_info_s);
-      stack_size = tcb->adj_stack_size - sizeof(struct tls_info_s);
+      stack_base = (uintptr_t)tcb->stack_alloc_ptr +
+                   sizeof(struct tls_info_s);
+      stack_size = tcb->adj_stack_size -
+                   sizeof(struct tls_info_s);
       up_stack_color((FAR void *)stack_base, stack_size);
 
 #endif /* CONFIG_STACK_COLORATION */
diff --git a/arch/renesas/src/common/up_createstack.c b/arch/renesas/src/common/up_createstack.c
index 5ba0551..bb6b974 100644
--- a/arch/renesas/src/common/up_createstack.c
+++ b/arch/renesas/src/common/up_createstack.c
@@ -182,12 +182,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 
       /* Save the adjusted stack values in the struct tcb_s */
 
-      tcb->adj_stack_ptr  = (uint32_t*)top_of_stack;
+      tcb->adj_stack_ptr  = (uint32_t *)top_of_stack;
       tcb->adj_stack_size = size_of_stack;
 
       board_autoled_on(LED_STACKCREATED);
       return OK;
     }
 
-   return ERROR;
+  return ERROR;
 }
diff --git a/arch/x86/src/i486/up_createstack.c b/arch/x86/src/i486/up_createstack.c
index eb667a6..20b6486 100644
--- a/arch/x86/src/i486/up_createstack.c
+++ b/arch/x86/src/i486/up_createstack.c
@@ -182,12 +182,12 @@ int up_create_stack(FAR struct tcb_s *tcb, size_t stack_size, uint8_t ttype)
 
       /* Save the adjusted stack values in the struct tcb_s */
 
-      tcb->adj_stack_ptr  = (uint32_t*)top_of_stack;
+      tcb->adj_stack_ptr  = (uint32_t *)top_of_stack;
       tcb->adj_stack_size = size_of_stack;
 
       board_autoled_on(LED_STACKCREATED);
       return OK;
     }
 
-   return ERROR;
+  return ERROR;
 }
diff --git a/drivers/input/button_lower.c b/drivers/input/button_lower.c
index 67dd991..bebf028 100644
--- a/drivers/input/button_lower.c
+++ b/drivers/input/button_lower.c
@@ -57,7 +57,8 @@
  * Private Function Prototypes
  ****************************************************************************/
 
-static btn_buttonset_t btn_supported(FAR const struct btn_lowerhalf_s *lower);
+static btn_buttonset_t
+btn_supported(FAR const struct btn_lowerhalf_s *lower);
 static btn_buttonset_t btn_buttons(FAR const struct btn_lowerhalf_s *lower);
 static void btn_enable(FAR const struct btn_lowerhalf_s *lower,
                        btn_buttonset_t press, btn_buttonset_t release,
diff --git a/drivers/leds/userled_lower.c b/drivers/leds/userled_lower.c
index 8f2fc9d..74643fa 100644
--- a/drivers/leds/userled_lower.c
+++ b/drivers/leds/userled_lower.c
@@ -55,7 +55,8 @@
  * Private Function Prototypes
  ****************************************************************************/
 
-static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower);
+static userled_set_t
+userled_supported(FAR const struct userled_lowerhalf_s *lower);
 static void userled_led(FAR const struct userled_lowerhalf_s *lower,
                         int led, bool ledon);
 static void userled_ledset(FAR const struct userled_lowerhalf_s *lower,
@@ -86,7 +87,8 @@ static const struct userled_lowerhalf_s g_userled_lower =
  *
  ****************************************************************************/
 
-static userled_set_t userled_supported(FAR const struct userled_lowerhalf_s *lower)
+static userled_set_t
+userled_supported(FAR const struct userled_lowerhalf_s *lower)
 {
   ledinfo("BOARD_NLEDS: %02x\n", BOARD_NLEDS);
   return (userled_set_t)((1 << BOARD_NLEDS) - 1);
diff --git a/fs/vfs/fs_fdopen.c b/fs/vfs/fs_fdopen.c
index bc40a13..0a347a6 100644
--- a/fs/vfs/fs_fdopen.c
+++ b/fs/vfs/fs_fdopen.c
@@ -239,8 +239,8 @@ FAR struct file_struct *fs_fdopen(int fd, int oflags, FAR struct tcb_s *tcb)
 
           /* Set up pointers */
 
-          stream->fs_bufend  = &stream->fs_bufstart[CONFIG_STDIO_BUFFER_SIZE];
-          stream->fs_bufpos  = stream->fs_bufstart;
+          stream->fs_bufend = &stream->fs_bufstart[CONFIG_STDIO_BUFFER_SIZE];
+          stream->fs_bufpos = stream->fs_bufstart;
           stream->fs_bufread = stream->fs_bufstart;
 
 #ifdef CONFIG_STDIO_LINEBUFFER
diff --git a/include/aio.h b/include/aio.h
index 10b25f7..28e1c71 100644
--- a/include/aio.h
+++ b/include/aio.h
@@ -51,7 +51,9 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
+
 /* These interfaces are not available to kernel code */
 
 #if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
@@ -75,6 +77,7 @@
 #endif
 
 /* Standard Definitions *****************************************************/
+
 /* aio_cancel return values
  *
  * AIO_ALLDONE     - Indicates that none of the requested operations could
diff --git a/include/errno.h b/include/errno.h
index 90de7d5..35dca42 100644
--- a/include/errno.h
+++ b/include/errno.h
@@ -49,33 +49,35 @@
 /* How can we access the errno variable? */
 
 #ifdef CONFIG_BUILD_FLAT
-   /* Flat build */
+  /* Flat build */
 
 #  if defined(CONFIG_LIB_SYSCALL) && !defined(__KERNEL__)
-   /* We still might be using system calls in user code.  If so, then
-    * user code will have no direct access to the errno variable.
-    */
+  /* We still might be using system calls in user code.  If so, then
+   * user code will have no direct access to the errno variable.
+   */
 
 #    undef __DIRECT_ERRNO_ACCESS
 
 #   else
-   /* Flat build with no system calls OR internal kernel logic... There
-    * is direct access.
-    */
+  /* Flat build with no system calls OR internal kernel logic... There
+   * is direct access.
+   */
 
 #    define __DIRECT_ERRNO_ACCESS 1
 #  endif
 
 #else
 #  if defined(__KERNEL__)
-   /* Kernel portion of protected/kernel build.  Kernel code has direct access */
+  /* Kernel portion of protected/kernel build. Kernel code has direct
+   * access
+   */
 
 #    define __DIRECT_ERRNO_ACCESS 1
 
 #  else
-   /* User portion of protected/kernel build.  Application code has only indirect
-    * access
-    */
+  /* User portion of protected/kernel build. Application code has only
+   * indirect access
+   */
 
 #    undef __DIRECT_ERRNO_ACCESS
 #  endif
diff --git a/include/nuttx/clock.h b/include/nuttx/clock.h
index d209130..a2a8900 100644
--- a/include/nuttx/clock.h
+++ b/include/nuttx/clock.h
@@ -436,7 +436,7 @@ int clock_systimespec(FAR struct timespec *ts);
  *   Return load measurement data for the select PID.
  *
  * Input Parameters:
- *   pid - The task ID of the thread of interest.  pid == 0 is the IDLE thread.
+ *   pid - The task ID of the thread of interest. pid == 0 is IDLE thread.
  *   cpuload - The location to return the CPU load
  *
  * Returned Value:
diff --git a/include/nuttx/lib/builtin.h b/include/nuttx/lib/builtin.h
index 6d36520..6093d25 100644
--- a/include/nuttx/lib/builtin.h
+++ b/include/nuttx/lib/builtin.h
@@ -102,7 +102,7 @@ EXTERN const int g_builtin_count;
 #endif
 
 /****************************************************************************
- * Public Functions
+ * Public Function Prototypes
  ****************************************************************************/
 
 /****************************************************************************
diff --git a/include/nuttx/sched.h b/include/nuttx/sched.h
index 60564c2..d45f1f0 100644
--- a/include/nuttx/sched.h
+++ b/include/nuttx/sched.h
@@ -63,7 +63,7 @@
 #  define HAVE_GROUP_MEMBERS  1
 #endif
 
-/* In any event, we don't need group members if support for pthreads is disabled */
+/* We don't need group members if support for pthreads is disabled */
 
 #ifdef CONFIG_DISABLE_PTHREAD
 #  undef HAVE_GROUP_MEMBERS
diff --git a/include/nuttx/userspace.h b/include/nuttx/userspace.h
index 1a1e4fa..c849b8a 100644
--- a/include/nuttx/userspace.h
+++ b/include/nuttx/userspace.h
@@ -54,7 +54,9 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
+
 /* If CONFIG_BUILD_PROTECTED, then CONFIG_NUTTX_USERSPACE must be defined to
  * provide the address where the user-space header can be found in memory.
  */
@@ -73,6 +75,7 @@
 #endif
 
 /* Helper Macros ************************************************************/
+
 /* This macro is used to access the struct userpace_s header that can be
  * found at the beginning of the user-space blob.
  */
@@ -89,9 +92,9 @@
 
 struct mm_heaps_s; /* Forward reference */
 
- /* Every user-space blob starts with a header that provides information about
- * the blob.  The form of that header is provided by struct userspace_s.  An
- * instance of this structure is expected to reside at CONFIG_NUTTX_USERSPACE.
+/* Every user-space blob starts with a header that provides information about
+ * the blob.  The form of that header is provided by struct userspace_s. An
+ * instance of this is expected to reside at CONFIG_NUTTX_USERSPACE.
  */
 
 struct userspace_s
@@ -166,7 +169,8 @@ extern "C"
  ****************************************************************************/
 
 #ifndef __KERNEL__
-void task_startup(main_t entrypt, int argc, FAR char *argv[]) noreturn_function;
+void task_startup(main_t entrypt, int argc, FAR char *argv[])
+       noreturn_function;
 #endif
 
 /****************************************************************************
diff --git a/include/stdio.h b/include/stdio.h
index f9be618..71213fd 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -172,7 +172,9 @@ void   setbuf(FAR FILE *stream, FAR char *buf);
 int    setvbuf(FAR FILE *stream, FAR char *buffer, int mode, size_t size);
 int    ungetc(int c, FAR FILE *stream);
 
-/* Operations on the stdout stream, buffers, paths, and the whole printf-family */
+/* Operations on the stdout stream, buffers, paths,
+ * and the whole printf-family
+ */
 
 void   perror(FAR const char *s);
 int    printf(FAR const IPTR char *fmt, ...);
diff --git a/libs/libc/libc.h b/libs/libc/libc.h
index a467d4d..71a58a2 100644
--- a/libs/libc/libc.h
+++ b/libs/libc/libc.h
@@ -45,9 +45,11 @@
 #include <sys/types.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <limits.h>
 #include <semaphore.h>
 
+#include <nuttx/kmalloc.h>
 #include <nuttx/streams.h>
 
 /****************************************************************************
@@ -82,9 +84,8 @@
  */
 
 #if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
-#  include <nuttx/kmalloc.h>
 
-   /* Domain-specific allocations */
+  /* Domain-specific allocations */
 
 #  define lib_malloc(s)     kmm_malloc(s)
 #  define lib_zalloc(s)     kmm_zalloc(s)
@@ -92,7 +93,7 @@
 #  define lib_memalign(p,s) kmm_memalign(p,s)
 #  define lib_free(p)       kmm_free(p)
 
-   /* User-accessible allocations */
+  /* User-accessible allocations */
 
 #  define lib_umalloc(s)    kumm_malloc(s)
 #  define lib_uzalloc(s)    kumm_zalloc(s)
@@ -100,16 +101,15 @@
 #  define lib_ufree(p)      kumm_free(p)
 
 #else
-#  include <stdlib.h>
 
-   /* Domain-specific allocations */
+  /* Domain-specific allocations */
 
 #  define lib_malloc(s)     malloc(s)
 #  define lib_zalloc(s)     zalloc(s)
 #  define lib_realloc(p,s)  realloc(p,s)
 #  define lib_free(p)       free(p)
 
-   /* User-accessible allocations */
+  /* User-accessible allocations */
 
 #  define lib_umalloc(s)    malloc(s)
 #  define lib_uzalloc(s)    zalloc(s)
diff --git a/libs/libc/stdio/lib_libdtoa.c b/libs/libc/stdio/lib_libdtoa.c
index 99f1b94..6f02566 100644
--- a/libs/libc/stdio/lib_libdtoa.c
+++ b/libs/libc/stdio/lib_libdtoa.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * libs/libc/unistd/lib_libdtoa.c
+ * libs/libc/stdio/lib_libdtoa.c
  *
  * This file was ported to NuttX by Yolande Cates.
  *
@@ -271,7 +271,9 @@ static void lib_dtoa(FAR struct lib_outstream_s *obj, int fmt, int prec,
         {
           obj->put(obj, '.');
 
-          /* Always print at least one digit to the right of the decimal point. */
+          /* Always print at least one digit to the right of the decimal
+           * point.
+           */
 
           if (notrailing)
             {
diff --git a/libs/libc/unistd/lib_sethostname.c b/libs/libc/unistd/lib_sethostname.c
index 00f9ae2..922ff48 100644
--- a/libs/libc/unistd/lib_sethostname.c
+++ b/libs/libc/unistd/lib_sethostname.c
@@ -1,5 +1,5 @@
 /****************************************************************************
- * libs/libc/unistd/lib_gethostname.c
+ * libs/libc/unistd/lib_sethostname.c
  *
  *   Copyright (C) 2015 Stavros Polymenis. All rights reserved.
  *   Copyright (C) 2015, 2016 Gregory Nutt. All rights reserved.
@@ -110,7 +110,7 @@ int sethostname(FAR const char *name, size_t size)
   irqstate_t flags;
 
   /* Save the new host name, truncating to HOST_NAME_MAX if necessary.  This
-   * internal copy is always NUL terminated.  The hostname is global resource.
+   * internal copy is always NUL terminated. The hostname is global resource.
    * There is a microscopic possibility that it could be accessed while we
    * are setting it.
    */
diff --git a/libs/libnx/nxcontext.h b/libs/libnx/nxcontext.h
index 9d36dc4..dbdeb88 100644
--- a/libs/libnx/nxcontext.h
+++ b/libs/libnx/nxcontext.h
@@ -45,26 +45,26 @@
 #include <sys/types.h>
 #include <stdbool.h>
 #include <stdio.h>
+#include <stdlib.h>
 #include <limits.h>
 
+#include <nuttx/kmalloc.h>
 #include <nuttx/streams.h>
 
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* The NuttX NX library an be build in two modes: (1) as a standard, C-library
- * that can be used by normal, user-space applications, or (2) as a special,
- * kernel-mode NX-library only used within the OS.  If NuttX is not being
- * built as separated kernel- and user-space modules, then only the first
- * mode is supported.
+/* The NuttX NX library can be build in two modes: (1) as a standard, C-
+ * library that can be used by normal, user-space applications, or (2) as
+ * a special, kernel-mode NX-library only used within the OS.  If NuttX is
+ * not being built as separated kernel- and user-space modules, then only
+ * the first mode is supported.
  */
 
 #if !defined(CONFIG_BUILD_FLAT) && defined(__KERNEL__)
 
-#  include <nuttx/kmalloc.h>
-
-   /* Domain-specific allocations */
+  /* Domain-specific allocations */
 
 #  define lib_malloc(s)     kmm_malloc(s)
 #  define lib_zalloc(s)     kmm_zalloc(s)
@@ -72,7 +72,7 @@
 #  define lib_memalign(p,s) kmm_memalign(p,s)
 #  define lib_free(p)       kmm_free(p)
 
-   /* User-accessible allocations */
+  /* User-accessible allocations */
 
 #  define lib_umalloc(s)    kumm_malloc(s)
 #  define lib_uzalloc(s)    kumm_zalloc(s)
@@ -80,16 +80,15 @@
 #  define lib_ufree(p)      kumm_free(p)
 
 #else
-#  include <stdlib.h>
 
-   /* Domain-specific allocations */
+  /* Domain-specific allocations */
 
 #  define lib_malloc(s)     malloc(s)
 #  define lib_zalloc(s)     zalloc(s)
 #  define lib_realloc(p,s)  realloc(p,s)
 #  define lib_free(p)       free(p)
 
-   /* User-accessible allocations */
+  /* User-accessible allocations */
 
 #  define lib_umalloc(s)    malloc(s)
 #  define lib_uzalloc(s)    zalloc(s)
diff --git a/mm/umm_heap/umm_heap.h b/mm/umm_heap/umm_heap.h
index ee10403..f631044 100644
--- a/mm/umm_heap/umm_heap.h
+++ b/mm/umm_heap/umm_heap.h
@@ -42,6 +42,8 @@
 
 #include <nuttx/config.h>
 
+#include <nuttx/addrenv.h>
+#include <nuttx/userspace.h>
 #include <nuttx/mm/mm.h>
 
 /****************************************************************************
@@ -56,7 +58,6 @@
  * ARCH_DATA_RESERVE_SIZE
  */
 
-#  include <nuttx/addrenv.h>
 #  define USR_HEAP (&ARCH_DATA_RESERVE->ar_usrheap)
 
 #elif defined(CONFIG_BUILD_PROTECTED) && defined(__KERNEL__)
@@ -65,7 +66,6 @@
  * structure from the userspace interface.
  */
 
-#  include <nuttx/userspace.h>
 #  define USR_HEAP (USERSPACE->us_heap)
 
 #else
@@ -74,8 +74,4 @@
 #  define USR_HEAP &g_mmheap
 #endif
 
-/****************************************************************************
- * Public Functions
- ****************************************************************************/
-
 #endif /* __MM_UMM_HEAP_UMM_HEAP_H */
diff --git a/sched/group/group_create.c b/sched/group/group_create.c
index 821233f..fcc1068 100644
--- a/sched/group/group_create.c
+++ b/sched/group/group_create.c
@@ -117,7 +117,7 @@ static void group_assign_grpid(FAR struct task_group_s *group)
 
   for (; ; )
     {
-      /* Increment the ID counter.  This is global data so be extra paranoid. */
+      /* Increment the ID counter. It is global data so be extra paranoid. */
 
       flags = enter_critical_section();
       grpid = ++g_grpid_counter;
@@ -193,8 +193,8 @@ static inline void group_inherit_identity(FAR struct task_group_s *group)
  *   function is called as part of the task creation sequence.  The structure
  *   allocated and zeroed, but otherwise uninitialized.  The full creation
  *   of the group of a two step process:  (1) First, this function allocates
- *   group structure early in the task creation sequence in order to provide a
- *   group container, then (2) group_initialize() is called to set up the
+ *   group structure early in the task creation sequence in order to provide
+ *   a group container, then (2) group_initialize() is called to set up the
  *   group membership.
  *
  * Input Parameters:
@@ -226,8 +226,8 @@ int group_allocate(FAR struct task_tcb_s *tcb, uint8_t ttype)
     }
 
 #if CONFIG_NFILE_STREAMS > 0 && defined(CONFIG_MM_KERNEL_HEAP)
-  /* If this group is being created for a privileged thread, then all elements
-   * of the group must be created for privileged access.
+  /* If this group is being created for a privileged thread, then all
+   * elements of the group must be created for privileged access.
    */
 
   if ((ttype & TCB_FLAG_TTYPE_MASK) == TCB_FLAG_TTYPE_KERNEL)
@@ -337,7 +337,7 @@ int group_initialize(FAR struct task_tcb_s *tcb)
 #ifdef HAVE_GROUP_MEMBERS
   /* Allocate space to hold GROUP_INITIAL_MEMBERS members of the group */
 
-  group->tg_members = (FAR pid_t *)kmm_malloc(GROUP_INITIAL_MEMBERS * sizeof(pid_t));
+  group->tg_members = kmm_malloc(GROUP_INITIAL_MEMBERS * sizeof(pid_t));
   if (!group->tg_members)
     {
       kmm_free(group);