Commit 52bcc7d9 authored by Roman Kiryanov's avatar Roman Kiryanov Committed by Greg Kroah-Hartman

platform: goldfish: pipe: Fix alignment to match parenthesis

checkpatch: Alignment should match open parenthesis.
Signed-off-by: default avatarRoman Kiryanov <rkir@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 562a74de
......@@ -252,8 +252,10 @@ static int goldfish_pipe_error_convert(int status)
}
}
static int pin_user_pages(unsigned long first_page, unsigned long last_page,
unsigned int last_page_size, int is_write,
static int pin_user_pages(unsigned long first_page,
unsigned long last_page,
unsigned int last_page_size,
int is_write,
struct page *pages[MAX_BUFFERS_PER_COMMAND],
unsigned int *iter_last_page_size)
{
......@@ -267,8 +269,8 @@ static int pin_user_pages(unsigned long first_page, unsigned long last_page,
*iter_last_page_size = last_page_size;
}
ret = get_user_pages_fast(
first_page, requested_pages, !is_write, pages);
ret = get_user_pages_fast(first_page, requested_pages, !is_write,
pages);
if (ret <= 0)
return -EFAULT;
if (ret < requested_pages)
......@@ -290,11 +292,14 @@ static void release_user_pages(struct page **pages, int pages_count,
}
/* Populate the call parameters, merging adjacent pages together */
static void populate_rw_params(
struct page **pages, int pages_count,
unsigned long address, unsigned long address_end,
unsigned long first_page, unsigned long last_page,
unsigned int iter_last_page_size, int is_write,
static void populate_rw_params(struct page **pages,
int pages_count,
unsigned long address,
unsigned long address_end,
unsigned long first_page,
unsigned long last_page,
unsigned int iter_last_page_size,
int is_write,
struct goldfish_pipe_command *command)
{
/*
......@@ -327,9 +332,13 @@ static void populate_rw_params(
}
static int transfer_max_buffers(struct goldfish_pipe *pipe,
unsigned long address, unsigned long address_end, int is_write,
unsigned long last_page, unsigned int last_page_size,
s32 *consumed_size, int *status)
unsigned long address,
unsigned long address_end,
int is_write,
unsigned long last_page,
unsigned int last_page_size,
s32 *consumed_size,
int *status)
{
static struct page *pages[MAX_BUFFERS_PER_COMMAND];
unsigned long first_page = address & PAGE_MASK;
......@@ -385,7 +394,9 @@ static int wait_for_host_signal(struct goldfish_pipe *pipe, int is_write)
}
static ssize_t goldfish_pipe_read_write(struct file *filp,
char __user *buffer, size_t bufflen, int is_write)
char __user *buffer,
size_t bufflen,
int is_write)
{
struct goldfish_pipe *pipe = filp->private_data;
int count = 0, ret = -EINVAL;
......@@ -413,8 +424,8 @@ static ssize_t goldfish_pipe_read_write(struct file *filp,
int status;
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)
break;
......@@ -477,8 +488,10 @@ static ssize_t goldfish_pipe_write(struct file *filp,
const char __user *buffer, size_t bufflen,
loff_t *ppos)
{
return goldfish_pipe_read_write(filp,
/* cast away the const */(char __user *)buffer, bufflen,
/* cast away the const */
char __user *no_const_buffer = (char __user *)buffer;
return goldfish_pipe_read_write(filp, no_const_buffer, bufflen,
/* is_write */ 1);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment