You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/03/11 06:25:54 UTC

[incubator-nuttx] 02/02: drivers/loop: fix nxstyle issues

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 fc2d2e2a5e283ccacd5cf5388e6920f62976940d
Author: Pelle Windestam <pe...@tagmaster.com>
AuthorDate: Wed Mar 11 06:47:14 2020 +0100

    drivers/loop: fix nxstyle issues
---
 drivers/loop/loop.c    | 12 ++++++++----
 drivers/loop/losetup.c |  8 ++++----
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/drivers/loop/loop.c b/drivers/loop/loop.c
index 344e3b4..8014c5c 100644
--- a/drivers/loop/loop.c
+++ b/drivers/loop/loop.c
@@ -57,7 +57,8 @@ static ssize_t loop_read(FAR struct file *filep, FAR char *buffer,
                  size_t buflen);
 static ssize_t loop_write(FAR struct file *filep, FAR const char *buffer,
                  size_t buflen);
-static int     loop_ioctl(FAR struct file *filep, int cmd, unsigned long arg);
+static int     loop_ioctl(FAR struct file *filep, int cmd,
+                 unsigned long arg);
 
 /****************************************************************************
  * Private Data
@@ -82,7 +83,8 @@ static const struct file_operations g_loop_fops =
  * Name: loop_read
  ****************************************************************************/
 
-static ssize_t loop_read(FAR struct file *filep, FAR char *buffer, size_t len)
+static ssize_t loop_read(FAR struct file *filep, FAR char *buffer,
+                         size_t len)
 {
   return 0; /* Return EOF */
 }
@@ -115,7 +117,8 @@ static int loop_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
 
     case LOOPIOC_SETUP:
       {
-         FAR struct losetup_s *setup = (FAR struct losetup_s *)((uintptr_t)arg);
+         FAR struct losetup_s *setup =
+           (FAR struct losetup_s *)((uintptr_t)arg);
 
         if (setup == NULL)
           {
@@ -130,7 +133,8 @@ static int loop_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
       break;
 
     /* Command:      LOOPIOC_TEARDOWN
-     * Description:  Teardown a loop device previously setup vis LOOPIOC_SETUP
+     * Description:  Teardown a loop device previously setup via
+                     LOOPIOC_SETUP
      * Argument:     A read-able pointer to the path of the device to be
      *               torn down
      * Dependencies: The loop device must be enabled (CONFIG_DEV_LOOP=y)
diff --git a/drivers/loop/losetup.c b/drivers/loop/losetup.c
index 385eb0c..f92b4cd 100644
--- a/drivers/loop/losetup.c
+++ b/drivers/loop/losetup.c
@@ -351,8 +351,8 @@ static int loop_geometry(FAR struct inode *inode,
  * Name: losetup
  *
  * Description:
- *   Setup the loop device so that it exports the file referenced by 'filename'
- *   as a block device.
+ *   Setup the loop device so that it exports the file referenced by
+ *   'filename' as a block device.
  *
  ****************************************************************************/
 
@@ -477,8 +477,8 @@ int loteardown(FAR const char *devname)
     }
 #endif
 
-  /* Open the block driver associated with devname so that we can get the inode
-   * reference.
+  /* Open the block driver associated with devname so that we can get the
+   * inode reference.
    */
 
   ret = open_blockdriver(devname, MS_RDONLY, &inode);