drivers/loop: fix nxstyle issues

This commit is contained in:
Pelle Windestam
2020-03-11 06:47:14 +01:00
committed by Xiang Xiao
parent 5afee5cbd1
commit fc2d2e2a5e
2 changed files with 12 additions and 8 deletions
+8 -4
View File
@@ -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)