nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gn...@apache.org
Subject [incubator-nuttx] 01/03: binfmt: nxstyle fixes
Date Wed, 22 Apr 2020 20:07:15 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit 7ddf7c6c25d620fe491dfafbc7397d4aa4861419
Author: Alin Jerpelea <alin.jerpelea@sony.com>
AuthorDate: Wed Apr 22 10:24:15 2020 +0200

    binfmt: nxstyle fixes
    
    small nxstyle fixes for binfmt to avoid CI warnings
    
    Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
---
 binfmt/binfmt.h                 |  7 ++++---
 binfmt/binfmt_copyargv.c        | 12 ++++++++----
 binfmt/binfmt_dumpmodule.c      |  4 +++-
 binfmt/binfmt_execsymtab.c      |  3 ++-
 binfmt/binfmt_globals.c         |  7 ++++---
 binfmt/elf.c                    |  4 ++--
 binfmt/libelf/libelf.h          | 17 +++++++++--------
 binfmt/libelf/libelf_sections.c |  4 +++-
 binfmt/libelf/libelf_symbols.c  |  4 +++-
 binfmt/nxflat.c                 |  4 ++--
 10 files changed, 40 insertions(+), 26 deletions(-)

diff --git a/binfmt/binfmt.h b/binfmt/binfmt.h
index 48218a8..d26bd31 100644
--- a/binfmt/binfmt.h
+++ b/binfmt/binfmt.h
@@ -61,9 +61,10 @@ extern "C"
 #define EXTERN extern
 #endif
 
-/* This is a list of registered handlers for different binary formats.  This
- * list should only be accessed by normal user programs.  It should be sufficient
- * protection to simply disable pre-emption when accessing this list.
+/* This is a list of registered handlers for different binary formats.
+ * This list should only be accessed by normal user programs.  It should be
+ * sufficient protection to simply disable pre-emption when accessing this
+ * list.
  */
 
 EXTERN FAR struct binfmt_s *g_binfmts;
diff --git a/binfmt/binfmt_copyargv.c b/binfmt/binfmt_copyargv.c
index cb1e91f..15c0f20 100644
--- a/binfmt/binfmt_copyargv.c
+++ b/binfmt/binfmt_copyargv.c
@@ -103,19 +103,23 @@ int binfmt_copyargv(FAR struct binary_s *bin, FAR char * const *argv)
 
       for (i = 0; argv[i]; i++)
         {
-          /* Increment the size of the allocation with the size of the next string */
+          /* Increment the size of the allocation with the size of the next
+           * string
+           */
 
           argsize += (strlen(argv[i]) + 1);
           nargs++;
 
-          /* This is a sanity check to prevent running away with an unterminated
-           * argv[] list.  MAX_EXEC_ARGS should be sufficiently large that this
+          /* This is a sanity check to prevent running away with an
+           * unterminated argv[] list.
+           * MAX_EXEC_ARGS should be sufficiently large that this
            * never happens in normal usage.
            */
 
           if (nargs > MAX_EXEC_ARGS)
             {
-              berr("ERROR: Too many arguments: %lu\n", (unsigned long)argvsize);
+              berr("ERROR: Too many arguments: %lu\n",
+                   (unsigned long)argvsize);
               return -E2BIG;
             }
         }
diff --git a/binfmt/binfmt_dumpmodule.c b/binfmt/binfmt_dumpmodule.c
index 1f35bc1..c10621b 100644
--- a/binfmt/binfmt_dumpmodule.c
+++ b/binfmt/binfmt_dumpmodule.c
@@ -75,7 +75,9 @@ int dump_module(FAR const struct binary_s *bin)
       binfo("  argv:      %p\n", bin->argv);
       binfo("  entrypt:   %p\n", bin->entrypt);
       binfo("  mapped:    %p size=%d\n", bin->mapped, bin->mapsize);
-      binfo("  alloc:     %p %p %p\n", bin->alloc[0], bin->alloc[1], bin->alloc[2]);
+      binfo("  alloc:     %p %p %p\n", bin->alloc[0],
+                                       bin->alloc[1],
+                                       bin->alloc[2]);
 #ifdef CONFIG_BINFMT_CONSTRUCTORS
       binfo("  ctors:     %p nctors=%d\n", bin->ctors, bin->nctors);
       binfo("  dtors:     %p ndtors=%d\n", bin->dtors, bin->ndtors);
diff --git a/binfmt/binfmt_execsymtab.c b/binfmt/binfmt_execsymtab.c
index d2e047f..89ac17b 100644
--- a/binfmt/binfmt_execsymtab.c
+++ b/binfmt/binfmt_execsymtab.c
@@ -97,7 +97,8 @@ static int g_exec_nsymbols;
  *
  * Input Parameters:
  *   symtab - The location to store the symbol table.
- *   nsymbols - The location to store the number of symbols in the symbol table.
+ *   nsymbols - The location to store the number of symbols in the symbol
+ *   table.
  *
  * Returned Value:
  *   None
diff --git a/binfmt/binfmt_globals.c b/binfmt/binfmt_globals.c
index ea01ab0..39c91f0 100644
--- a/binfmt/binfmt_globals.c
+++ b/binfmt/binfmt_globals.c
@@ -51,9 +51,10 @@
  * Public Data
  ****************************************************************************/
 
-/* This is a list of registered handlers for different binary formats.  This
- * list should only be accessed by normal user programs.  It should be sufficient
- * protection to simply disable pre-emption when accessing this list.
+/* This is a list of registered handlers for different binary formats.
+ * This list should only be accessed by normal user programs.  It should be
+ * sufficient protection to simply disable pre-emption when accessing this
+ * list.
  */
 
 FAR struct binfmt_s *g_binfmts;
diff --git a/binfmt/elf.c b/binfmt/elf.c
index 66632d7..a42b794 100644
--- a/binfmt/elf.c
+++ b/binfmt/elf.c
@@ -57,8 +57,8 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be
- * defined or CONFIG_ELF_DUMPBUFFER does nothing.
+/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT
+ * have to be defined or CONFIG_ELF_DUMPBUFFER does nothing.
  */
 
 #if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT)
diff --git a/binfmt/libelf/libelf.h b/binfmt/libelf/libelf.h
index 4190829..ecde4a1 100644
--- a/binfmt/libelf/libelf.h
+++ b/binfmt/libelf/libelf.h
@@ -169,8 +169,8 @@ int elf_readsym(FAR struct elf_loadinfo_s *loadinfo, int index,
  *   0 (OK) is returned on success and a negated errno is returned on
  *   failure.
  *
- *   EINVAL - There is something inconsistent in the symbol table (should only
- *            happen if the file is corrupted)
+ *   EINVAL - There is something inconsistent in the symbol table (should
+ *            only happen if the file is corrupted)
  *   ENOSYS - Symbol lies in common
  *   ESRCH  - Symbol has no name
  *   ENOENT - Symbol undefined and not provided via a symbol table
@@ -265,12 +265,13 @@ int elf_loaddtors(FAR struct elf_loadinfo_s *loadinfo);
  * Name: elf_addrenv_alloc
  *
  * Description:
- *   Allocate memory for the ELF image (textalloc and dataalloc). If
- *   CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kmm_zalloc() and
- *   dataalloc will be a offset from textalloc.  If CONFIG_ARCH_ADDRENV-y, then
- *   textalloc and dataalloc will be allocated using up_addrenv_create().  In
- *   either case, there will be a unique instance of textalloc and dataalloc
- *   (and stack) for each instance of a process.
+ *   Allocate memory for the ELF image (textalloc and dataalloc).
+ *   If CONFIG_ARCH_ADDRENV=n, textalloc will be allocated using kmm_zalloc()
+ *   and dataalloc will be a offset from textalloc.
+ *   If CONFIG_ARCH_ADDRENV-y, then textalloc and dataalloc will be allocated
+ *   using up_addrenv_create().
+ *   In either case, there will be a unique instance of textalloc and
+ *   dataalloc (and stack) for each instance of a process.
  *
  * Input Parameters:
  *   loadinfo - Load state information
diff --git a/binfmt/libelf/libelf_sections.c b/binfmt/libelf/libelf_sections.c
index ac0c9dc..3acc897 100644
--- a/binfmt/libelf/libelf_sections.c
+++ b/binfmt/libelf/libelf_sections.c
@@ -254,7 +254,9 @@ int elf_findsection(FAR struct elf_loadinfo_s *loadinfo,
   int ret;
   int i;
 
-  /* Search through the shdr[] array in loadinfo for a section named 'sectname' */
+  /* Search through the shdr[] array in loadinfo for a section named
+   * 'sectname'
+   */
 
   for (i = 0; i < loadinfo->ehdr.e_shnum; i++)
     {
diff --git a/binfmt/libelf/libelf_symbols.c b/binfmt/libelf/libelf_symbols.c
index f5ac359..34a3c0c 100644
--- a/binfmt/libelf/libelf_symbols.c
+++ b/binfmt/libelf/libelf_symbols.c
@@ -319,7 +319,9 @@ int elf_symvalue(FAR struct elf_loadinfo_s *loadinfo, FAR Elf_Sym *sym,
             return -ENOENT;
           }
 
-        /* Yes... add the exported symbol value to the ELF symbol table entry */
+        /* Yes... add the exported symbol value to the ELF symbol table
+         * entry
+         */
 
         binfo("SHN_UNDEF: name=%s %08x+%08x=%08x\n",
               loadinfo->iobuffer, sym->st_value, symbol->sym_value,
diff --git a/binfmt/nxflat.c b/binfmt/nxflat.c
index ab1e6f8..f3c303e 100644
--- a/binfmt/nxflat.c
+++ b/binfmt/nxflat.c
@@ -58,8 +58,8 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT have to be
- * defined or CONFIG_NXFLAT_DUMPBUFFER does nothing.
+/* CONFIG_DEBUG_FEATURES, CONFIG_DEBUG_INFO, and CONFIG_DEBUG_BINFMT
+ * have to be defined or CONFIG_NXFLAT_DUMPBUFFER does nothing.
  */
 
 #if !defined(CONFIG_DEBUG_INFO) || !defined (CONFIG_DEBUG_BINFMT)


Mime
View raw message