goldfish: pipe: ANDROID: add blank lines
To separate variable declarations from executable code and to improve readability. Bug: 72717639 Bug: 66884503 Change-Id: I46fb70b13b8e3d061dfc2288f5720a379f1f39a9 Signed-off-by: Roman Kiryanov <rkir@google.com>
This commit is contained in:
parent
c4fcb01762
commit
9a7f2e9641
1 changed files with 9 additions and 2 deletions
|
@ -49,7 +49,6 @@
|
||||||
#include <linux/printk.h>
|
#include <linux/printk.h>
|
||||||
#include "goldfish_pipe.h"
|
#include "goldfish_pipe.h"
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Update this when something changes in the driver's behavior so the host
|
* Update this when something changes in the driver's behavior so the host
|
||||||
* can benefit from knowing it
|
* can benefit from knowing it
|
||||||
|
@ -228,9 +227,12 @@ static int goldfish_cmd_locked(struct goldfish_pipe *pipe, enum PipeCmdCode cmd)
|
||||||
static int goldfish_cmd(struct goldfish_pipe *pipe, enum PipeCmdCode cmd)
|
static int goldfish_cmd(struct goldfish_pipe *pipe, enum PipeCmdCode cmd)
|
||||||
{
|
{
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
if (mutex_lock_interruptible(&pipe->lock))
|
if (mutex_lock_interruptible(&pipe->lock))
|
||||||
return PIPE_ERROR_IO;
|
return PIPE_ERROR_IO;
|
||||||
|
|
||||||
status = goldfish_cmd_locked(pipe, cmd);
|
status = goldfish_cmd_locked(pipe, cmd);
|
||||||
|
|
||||||
mutex_unlock(&pipe->lock);
|
mutex_unlock(&pipe->lock);
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
@ -361,7 +363,6 @@ static int transfer_max_buffers(struct goldfish_pipe* pipe,
|
||||||
mutex_unlock(&pipe->lock);
|
mutex_unlock(&pipe->lock);
|
||||||
|
|
||||||
release_user_pages(pages, pages_count, is_write, *consumed_size);
|
release_user_pages(pages, pages_count, is_write, *consumed_size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -414,6 +415,7 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
|
||||||
while (address < address_end) {
|
while (address < address_end) {
|
||||||
s32 consumed_size;
|
s32 consumed_size;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
ret = transfer_max_buffers(pipe, address, address_end, is_write,
|
ret = transfer_max_buffers(pipe, address, address_end, is_write,
|
||||||
last_page, last_page_size, &consumed_size, &status);
|
last_page, last_page_size, &consumed_size, &status);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
@ -724,6 +726,7 @@ static int goldfish_pipe_open(struct inode *inode, struct file *file)
|
||||||
pr_err("Could not tell host of new pipe! status=%d\n", status);
|
pr_err("Could not tell host of new pipe! status=%d\n", status);
|
||||||
goto err_cmd;
|
goto err_cmd;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* All is done, save the pipe into the file's private data field */
|
/* All is done, save the pipe into the file's private data field */
|
||||||
file->private_data = pipe;
|
file->private_data = pipe;
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -754,8 +757,10 @@ static int goldfish_pipe_release(struct inode *inode, struct file *filp)
|
||||||
spin_unlock_irqrestore(&dev->lock, flags);
|
spin_unlock_irqrestore(&dev->lock, flags);
|
||||||
|
|
||||||
filp->private_data = NULL;
|
filp->private_data = NULL;
|
||||||
|
|
||||||
free_page((unsigned long)pipe->command_buffer);
|
free_page((unsigned long)pipe->command_buffer);
|
||||||
kfree(pipe);
|
kfree(pipe);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -829,6 +834,7 @@ static int goldfish_pipe_device_init_v2(struct platform_device *pdev)
|
||||||
writel((u32)(unsigned long)paddr,
|
writel((u32)(unsigned long)paddr,
|
||||||
dev->base + PIPE_REG_OPEN_BUFFER);
|
dev->base + PIPE_REG_OPEN_BUFFER);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -897,6 +903,7 @@ error:
|
||||||
static int goldfish_pipe_remove(struct platform_device *pdev)
|
static int goldfish_pipe_remove(struct platform_device *pdev)
|
||||||
{
|
{
|
||||||
struct goldfish_pipe_dev *dev = pipe_dev;
|
struct goldfish_pipe_dev *dev = pipe_dev;
|
||||||
|
|
||||||
if (dev->version < PIPE_CURRENT_DEVICE_VERSION)
|
if (dev->version < PIPE_CURRENT_DEVICE_VERSION)
|
||||||
goldfish_pipe_device_deinit_v1(pdev);
|
goldfish_pipe_device_deinit_v1(pdev);
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Reference in a new issue