drivers/bch: fix nxstyle errors

This commit is contained in:
Pelle Windestam
2020-03-11 06:44:32 +01:00
committed by Xiang Xiao
parent 14d037b8d5
commit 5afee5cbd1
5 changed files with 20 additions and 15 deletions
+10 -8
View File
@@ -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;