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:53 UTC

[incubator-nuttx] 01/02: drivers/bch: fix nxstyle errors

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 5afee5cbd1d9ca303086ce13f2ccf9b4b05dc8db
Author: Pelle Windestam <pe...@tagmaster.com>
AuthorDate: Wed Mar 11 06:44:32 2020 +0100

    drivers/bch: fix nxstyle errors
---
 drivers/bch/bch.h           |  3 ++-
 drivers/bch/bchdev_driver.c | 18 ++++++++++--------
 drivers/bch/bchlib_read.c   |  7 ++++---
 drivers/bch/bchlib_setup.c  |  3 ++-
 drivers/bch/bchlib_write.c  |  4 ++--
 5 files changed, 20 insertions(+), 15 deletions(-)

diff --git a/drivers/bch/bch.h b/drivers/bch/bch.h
index 0813fae..b1c5920 100644
--- a/drivers/bch/bch.h
+++ b/drivers/bch/bch.h
@@ -85,7 +85,8 @@ struct bchlib_s
 #undef EXTERN
 #if defined(__cplusplus)
 #define EXTERN extern "C"
-extern "C" {
+extern "C"
+{
 #else
 #define EXTERN extern
 #endif
diff --git a/drivers/bch/bchdev_driver.c b/drivers/bch/bchdev_driver.c
index 0cea8a6..6a2afc5 100644
--- a/drivers/bch/bchdev_driver.c
+++ b/drivers/bch/bchdev_driver.c
@@ -259,15 +259,16 @@ static off_t bch_seek(FAR struct file *filep, off_t offset, int whence)
 
   /* Opengroup.org:
    *
-   *  "The lseek() function shall allow the file offset to be set beyond the end
-   *   of the existing data in the file. If data is later written at this point,
-   *   subsequent reads of data in the gap shall return bytes with the value 0
-   *   until data is actually written into the gap."
+   *  "The lseek() function shall allow the file offset to be set beyond the
+   *   end of the existing data in the file. If data is later written at this
+   *   point, subsequent reads of data in the gap shall return bytes with the
+   *   value 0 until data is actually written into the gap."
    *
-   * We can conform to the first part, but not the second.  But return EINVAL if
+   * We can conform to the first part, but not the second.  But return EINVAL
+   * if:
    *
-   *  "...the resulting file offset would be negative for a regular file, block
-   *   special file, or directory."
+   *  "...the resulting file offset would be negative for a regular file,
+   *  block special file, or directory."
    */
 
   if (newpos >= 0)
@@ -312,7 +313,8 @@ static ssize_t bch_read(FAR struct file *filep, FAR char *buffer, size_t len)
  * Name: bch_write
  ****************************************************************************/
 
-static ssize_t bch_write(FAR struct file *filep, FAR const char *buffer, size_t len)
+static ssize_t bch_write(FAR struct file *filep, FAR const char *buffer,
+                         size_t len)
 {
   FAR struct inode *inode = filep->f_inode;
   FAR struct bchlib_s *bch;
diff --git a/drivers/bch/bchlib_read.c b/drivers/bch/bchlib_read.c
index 5fe680a..1a28995 100644
--- a/drivers/bch/bchlib_read.c
+++ b/drivers/bch/bchlib_read.c
@@ -72,12 +72,13 @@
  * Name: bchlib_read
  *
  * Description:
- *   Read from the block device set-up by bchlib_setup as if it were a character
- *   device.
+ *   Read from the block device set-up by bchlib_setup as if it were a
+ *   character device.
  *
  ****************************************************************************/
 
-ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset, size_t len)
+ssize_t bchlib_read(FAR void *handle, FAR char *buffer, size_t offset,
+                    size_t len)
 {
   FAR struct bchlib_s *bch = (FAR struct bchlib_s *)handle;
   size_t   nsectors;
diff --git a/drivers/bch/bchlib_setup.c b/drivers/bch/bchlib_setup.c
index d4a37a4..5c4466f 100644
--- a/drivers/bch/bchlib_setup.c
+++ b/drivers/bch/bchlib_setup.c
@@ -93,7 +93,8 @@ int bchlib_setup(const char *blkdev, bool readonly, FAR void **handle)
       goto errout_with_bch;
     }
 
-  DEBUGASSERT(bch->inode && bch->inode->u.i_bops && bch->inode->u.i_bops->geometry);
+  DEBUGASSERT(bch->inode && bch->inode->u.i_bops &&
+              bch->inode->u.i_bops->geometry);
 
   ret = bch->inode->u.i_bops->geometry(bch->inode, &geo);
   if (ret < 0)
diff --git a/drivers/bch/bchlib_write.c b/drivers/bch/bchlib_write.c
index eeaa44e..90f1af0 100644
--- a/drivers/bch/bchlib_write.c
+++ b/drivers/bch/bchlib_write.c
@@ -59,8 +59,8 @@
  * Name: bchlib_write
  *
  * Description:
- *   Write to the block device set-up by bchlib_setup as if it were a character
- *   device.
+ *   Write to the block device set-up by bchlib_setup as if it were a
+ *   character device.
  *
  ****************************************************************************/