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 2021/02/05 15:16:08 UTC

[incubator-nuttx] 02/03: fs: nxffs: nxstyle error fix

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 a544c3f49991dd13f46a642f94a8f755dd930d83
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Thu Feb 4 13:56:38 2021 +0100

    fs: nxffs: nxstyle error fix
    
    Fix nxstyle errors to pass CI
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 fs/dirent/fs_closedir.c         |  5 +++--
 fs/driver/fs_closeblockdriver.c |  3 ++-
 fs/mmap/fs_rammap.h             |  4 ++--
 fs/nxffs/nxffs_dump.c           | 26 ++++++++++++++++++--------
 fs/vfs/fs_read.c                |  4 +++-
 5 files changed, 28 insertions(+), 14 deletions(-)

diff --git a/fs/dirent/fs_closedir.c b/fs/dirent/fs_closedir.c
index cd6f64a..c19243d 100644
--- a/fs/dirent/fs_closedir.c
+++ b/fs/dirent/fs_closedir.c
@@ -89,8 +89,9 @@ int closedir(FAR DIR *dirp)
       goto errout;
     }
 
-  /* A special case is when we enumerate an "empty", unused inode.  That is
-   * an inode in the pseudo-filesystem that has no operations and no children.
+  /* A special case is when we enumerate an "empty", unused inode.
+   * That is an inode in the pseudo-filesystem that has no operations
+   * and no children.
    * This is a "dangling" directory entry that has lost its childre.
    */
 
diff --git a/fs/driver/fs_closeblockdriver.c b/fs/driver/fs_closeblockdriver.c
index 195c479..c0602f9 100644
--- a/fs/driver/fs_closeblockdriver.c
+++ b/fs/driver/fs_closeblockdriver.c
@@ -56,7 +56,8 @@
  *   Call the close method and release the inode
  *
  * Input Parameters:
- *   inode - reference to the inode of a block driver opened by open_blockdriver
+ *   inode - reference to the inode of a block driver opened by
+ *           open_blockdriver
  *
  * Returned Value:
  *   Returns zero on success or a negated errno on failure:
diff --git a/fs/mmap/fs_rammap.h b/fs/mmap/fs_rammap.h
index bbe7662..b96e623 100644
--- a/fs/mmap/fs_rammap.h
+++ b/fs/mmap/fs_rammap.h
@@ -128,8 +128,8 @@ void rammap_initialize(void);
  *   offset  The offset into the file to map
  *
  * Returned Value:
- *   On success, rammmap() returns a pointer to the mapped area. On error, the
- *   value MAP_FAILED is returned, and errno is set  appropriately.
+ *   On success, rammmap() returns a pointer to the mapped area. On error,
+ *   the value MAP_FAILED is returned, and errno is set  appropriately.
  *
  *     EBADF
  *      'fd' is not a valid file descriptor.
diff --git a/fs/nxffs/nxffs_dump.c b/fs/nxffs/nxffs_dump.c
index 46fb570..189c3fa 100644
--- a/fs/nxffs/nxffs_dump.c
+++ b/fs/nxffs/nxffs_dump.c
@@ -147,8 +147,8 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
 
   if (doffs < blkinfo->offset + offset + SIZEOF_NXFFS_BLOCK_HDR)
     {
-      /* The first data block begins before the inode header.  This can't can't
-       * be a real inode header (or it is a corrupted one).
+      /* The first data block begins before the inode header.  This can't
+       * can't be a real inode header (or it is a corrupted one).
        */
 
       return ERROR;
@@ -197,7 +197,8 @@ static inline ssize_t nxffs_analyzeinode(FAR struct nxffs_blkinfo_s *blkinfo,
   nxffs_wrle32(inode.crc, 0);
 
   crc = crc32((FAR const uint8_t *)&inode, SIZEOF_NXFFS_INODE_HDR);
-  crc = crc32part(&blkinfo->buffer[noffs - blkinfo->offset], inode.namlen, crc);
+  crc = crc32part(&blkinfo->buffer[noffs - blkinfo->offset],
+                  inode.namlen, crc);
 
   if (crc != ecrc)
     {
@@ -273,7 +274,8 @@ static inline ssize_t nxffs_analyzedata(FAR struct nxffs_blkinfo_s *blkinfo,
   nxffs_wrle32(dathdr.crc, 0);
 
   crc = crc32((FAR const uint8_t *)&dathdr, SIZEOF_NXFFS_DATA_HDR);
-  crc = crc32part(&blkinfo->buffer[offset + SIZEOF_NXFFS_DATA_HDR], datlen, crc);
+  crc = crc32part(&blkinfo->buffer[offset + SIZEOF_NXFFS_DATA_HDR],
+                  datlen, crc);
 
   if (crc != ecrc)
     {
@@ -329,7 +331,12 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo)
         {
           if (blkinfo->verbose)
             {
-              syslog(LOG_NOTICE, g_format, blkinfo->block, 0, "BLOCK", "ERASED ",
+              syslog(LOG_NOTICE,
+                     g_format,
+                     blkinfo->block,
+                     0,
+                     "BLOCK",
+                     "ERASED ",
                      blkinfo->geo.blocksize);
             }
 
@@ -409,8 +416,9 @@ static inline void nxffs_analyze(FAR struct nxffs_blkinfo_s *blkinfo)
  * Name: nxffs_dump
  *
  * Description:
- *   Dump a summary of the contents of an NXFFS file system.  CONFIG_DEBUG_FEATURES
- *   and CONFIG_DEBUG_FS must be enabled for this function to do anything.
+ *   Dump a summary of the contents of an NXFFS file system.
+ *   CONFIG_DEBUG_FEATURES and CONFIG_DEBUG_FS must be enabled
+ *   for this function to do anything.
  *
  * Input Parameters:
  *   mtd - The MTD device that provides the interface to NXFFS-formatted
@@ -435,7 +443,9 @@ int nxffs_dump(FAR struct mtd_dev_s *mtd, bool verbose)
    */
 
   memset(&blkinfo, 0, sizeof(struct nxffs_blkinfo_s));
-  ret = MTD_IOCTL(mtd, MTDIOC_GEOMETRY, (unsigned long)((uintptr_t)&blkinfo.geo));
+  ret = MTD_IOCTL(mtd,
+                  MTDIOC_GEOMETRY,
+                  (unsigned long)((uintptr_t)&blkinfo.geo));
   if (ret < 0)
     {
       ferr("ERROR: MTD ioctl(MTDIOC_GEOMETRY) failed: %d\n", -ret);
diff --git a/fs/vfs/fs_read.c b/fs/vfs/fs_read.c
index 994c613..5f43571 100644
--- a/fs/vfs/fs_read.c
+++ b/fs/vfs/fs_read.c
@@ -107,7 +107,9 @@ ssize_t file_read(FAR struct file *filep, FAR void *buf, size_t nbytes)
        * signature and position in the operations vtable.
        */
 
-      ret = (int)inode->u.i_ops->read(filep, (FAR char *)buf, (size_t)nbytes);
+      ret = (int)inode->u.i_ops->read(filep,
+                                     (FAR char *)buf,
+                                     (size_t)nbytes);
     }
 
   /* Return the number of bytes read (or possibly an error code) */