staging: android: ion: Fix alignment
Alignment should match open parenthesis as per checkpatch.pl. Signed-off-by: Johanna Abrahamsson <johanna@mjao.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
ef2d4f6c1b
commit
121ca0c64f
|
@ -174,10 +174,10 @@ static void ion_buffer_add(struct ion_device *dev,
|
||||||
|
|
||||||
/* this function should only be called while dev->lock is held */
|
/* this function should only be called while dev->lock is held */
|
||||||
static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
|
static struct ion_buffer *ion_buffer_create(struct ion_heap *heap,
|
||||||
struct ion_device *dev,
|
struct ion_device *dev,
|
||||||
unsigned long len,
|
unsigned long len,
|
||||||
unsigned long align,
|
unsigned long align,
|
||||||
unsigned long flags)
|
unsigned long flags)
|
||||||
{
|
{
|
||||||
struct ion_buffer *buffer;
|
struct ion_buffer *buffer;
|
||||||
struct sg_table *table;
|
struct sg_table *table;
|
||||||
|
@ -331,7 +331,7 @@ static void ion_buffer_remove_from_handle(struct ion_buffer *buffer)
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ion_handle *ion_handle_create(struct ion_client *client,
|
static struct ion_handle *ion_handle_create(struct ion_client *client,
|
||||||
struct ion_buffer *buffer)
|
struct ion_buffer *buffer)
|
||||||
{
|
{
|
||||||
struct ion_handle *handle;
|
struct ion_handle *handle;
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ static struct ion_handle *ion_handle_lookup(struct ion_client *client,
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct ion_handle *ion_handle_get_by_id_nolock(struct ion_client *client,
|
static struct ion_handle *ion_handle_get_by_id_nolock(struct ion_client *client,
|
||||||
int id)
|
int id)
|
||||||
{
|
{
|
||||||
struct ion_handle *handle;
|
struct ion_handle *handle;
|
||||||
|
|
||||||
|
@ -575,7 +575,7 @@ static void *ion_buffer_kmap_get(struct ion_buffer *buffer)
|
||||||
}
|
}
|
||||||
vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
|
vaddr = buffer->heap->ops->map_kernel(buffer->heap, buffer);
|
||||||
if (WARN_ONCE(vaddr == NULL,
|
if (WARN_ONCE(vaddr == NULL,
|
||||||
"heap->ops->map_kernel should return ERR_PTR on error"))
|
"heap->ops->map_kernel should return ERR_PTR on error"))
|
||||||
return ERR_PTR(-EINVAL);
|
return ERR_PTR(-EINVAL);
|
||||||
if (IS_ERR(vaddr))
|
if (IS_ERR(vaddr))
|
||||||
return vaddr;
|
return vaddr;
|
||||||
|
@ -744,7 +744,7 @@ static const struct file_operations debug_client_fops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
static int ion_get_client_serial(const struct rb_root *root,
|
static int ion_get_client_serial(const struct rb_root *root,
|
||||||
const unsigned char *name)
|
const unsigned char *name)
|
||||||
{
|
{
|
||||||
int serial = -1;
|
int serial = -1;
|
||||||
struct rb_node *node;
|
struct rb_node *node;
|
||||||
|
@ -833,7 +833,7 @@ struct ion_client *ion_client_create(struct ion_device *dev,
|
||||||
|
|
||||||
path = dentry_path(dev->clients_debug_root, buf, 256);
|
path = dentry_path(dev->clients_debug_root, buf, 256);
|
||||||
pr_err("Failed to create client debugfs at %s/%s\n",
|
pr_err("Failed to create client debugfs at %s/%s\n",
|
||||||
path, client->display_name);
|
path, client->display_name);
|
||||||
}
|
}
|
||||||
|
|
||||||
up_write(&dev->lock);
|
up_write(&dev->lock);
|
||||||
|
@ -901,7 +901,7 @@ static void ion_unmap_dma_buf(struct dma_buf_attachment *attachment,
|
||||||
}
|
}
|
||||||
|
|
||||||
void ion_pages_sync_for_device(struct device *dev, struct page *page,
|
void ion_pages_sync_for_device(struct device *dev, struct page *page,
|
||||||
size_t size, enum dma_data_direction dir)
|
size_t size, enum dma_data_direction dir)
|
||||||
{
|
{
|
||||||
struct scatterlist sg;
|
struct scatterlist sg;
|
||||||
|
|
||||||
|
@ -941,7 +941,7 @@ static void ion_buffer_sync_for_device(struct ion_buffer *buffer,
|
||||||
|
|
||||||
if (ion_buffer_page_is_dirty(page))
|
if (ion_buffer_page_is_dirty(page))
|
||||||
ion_pages_sync_for_device(dev, ion_buffer_page(page),
|
ion_pages_sync_for_device(dev, ion_buffer_page(page),
|
||||||
PAGE_SIZE, dir);
|
PAGE_SIZE, dir);
|
||||||
|
|
||||||
ion_buffer_page_clean(buffer->pages + i);
|
ion_buffer_page_clean(buffer->pages + i);
|
||||||
}
|
}
|
||||||
|
@ -1019,7 +1019,7 @@ static int ion_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma)
|
||||||
|
|
||||||
if (!buffer->heap->ops->map_user) {
|
if (!buffer->heap->ops->map_user) {
|
||||||
pr_err("%s: this heap does not define a method for mapping to userspace\n",
|
pr_err("%s: this heap does not define a method for mapping to userspace\n",
|
||||||
__func__);
|
__func__);
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1110,7 +1110,7 @@ static struct dma_buf_ops dma_buf_ops = {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct dma_buf *ion_share_dma_buf(struct ion_client *client,
|
struct dma_buf *ion_share_dma_buf(struct ion_client *client,
|
||||||
struct ion_handle *handle)
|
struct ion_handle *handle)
|
||||||
{
|
{
|
||||||
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
DEFINE_DMA_BUF_EXPORT_INFO(exp_info);
|
||||||
struct ion_buffer *buffer;
|
struct ion_buffer *buffer;
|
||||||
|
@ -1285,9 +1285,9 @@ static long ion_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||||
struct ion_handle *handle;
|
struct ion_handle *handle;
|
||||||
|
|
||||||
handle = ion_alloc(client, data.allocation.len,
|
handle = ion_alloc(client, data.allocation.len,
|
||||||
data.allocation.align,
|
data.allocation.align,
|
||||||
data.allocation.heap_id_mask,
|
data.allocation.heap_id_mask,
|
||||||
data.allocation.flags);
|
data.allocation.flags);
|
||||||
if (IS_ERR(handle))
|
if (IS_ERR(handle))
|
||||||
return PTR_ERR(handle);
|
return PTR_ERR(handle);
|
||||||
|
|
||||||
|
@ -1472,7 +1472,7 @@ static int ion_debug_heap_show(struct seq_file *s, void *unused)
|
||||||
seq_printf(s, "%16s %16zu\n", "total ", total_size);
|
seq_printf(s, "%16s %16zu\n", "total ", total_size);
|
||||||
if (heap->flags & ION_HEAP_FLAG_DEFER_FREE)
|
if (heap->flags & ION_HEAP_FLAG_DEFER_FREE)
|
||||||
seq_printf(s, "%16s %16zu\n", "deferred free",
|
seq_printf(s, "%16s %16zu\n", "deferred free",
|
||||||
heap->free_list_size);
|
heap->free_list_size);
|
||||||
seq_puts(s, "----------------------------------------------------\n");
|
seq_puts(s, "----------------------------------------------------\n");
|
||||||
|
|
||||||
if (heap->debug_show)
|
if (heap->debug_show)
|
||||||
|
@ -1554,15 +1554,15 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap)
|
||||||
plist_node_init(&heap->node, -heap->id);
|
plist_node_init(&heap->node, -heap->id);
|
||||||
plist_add(&heap->node, &dev->heaps);
|
plist_add(&heap->node, &dev->heaps);
|
||||||
debug_file = debugfs_create_file(heap->name, 0664,
|
debug_file = debugfs_create_file(heap->name, 0664,
|
||||||
dev->heaps_debug_root, heap,
|
dev->heaps_debug_root, heap,
|
||||||
&debug_heap_fops);
|
&debug_heap_fops);
|
||||||
|
|
||||||
if (!debug_file) {
|
if (!debug_file) {
|
||||||
char buf[256], *path;
|
char buf[256], *path;
|
||||||
|
|
||||||
path = dentry_path(dev->heaps_debug_root, buf, 256);
|
path = dentry_path(dev->heaps_debug_root, buf, 256);
|
||||||
pr_err("Failed to create heap debugfs at %s/%s\n",
|
pr_err("Failed to create heap debugfs at %s/%s\n",
|
||||||
path, heap->name);
|
path, heap->name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (heap->shrinker.count_objects && heap->shrinker.scan_objects) {
|
if (heap->shrinker.count_objects && heap->shrinker.scan_objects) {
|
||||||
|
@ -1577,7 +1577,7 @@ void ion_device_add_heap(struct ion_device *dev, struct ion_heap *heap)
|
||||||
|
|
||||||
path = dentry_path(dev->heaps_debug_root, buf, 256);
|
path = dentry_path(dev->heaps_debug_root, buf, 256);
|
||||||
pr_err("Failed to create heap shrinker debugfs at %s/%s\n",
|
pr_err("Failed to create heap shrinker debugfs at %s/%s\n",
|
||||||
path, debug_name);
|
path, debug_name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue