dma-buf: Minor coding style fixes
- WARNING: Missing a blank line after declarations - WARNING: line over 80 characters - WARNING: please, no space before tabs Signed-off-by: Jagan Teki <jteki@openedev.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Sumit Semwal <sumit.semwal@linaro.org>
This commit is contained in:
parent
9abdffe286
commit
5136629dc5
|
@ -287,6 +287,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info)
|
||||||
struct reservation_object *resv = exp_info->resv;
|
struct reservation_object *resv = exp_info->resv;
|
||||||
struct file *file;
|
struct file *file;
|
||||||
size_t alloc_size = sizeof(struct dma_buf);
|
size_t alloc_size = sizeof(struct dma_buf);
|
||||||
|
|
||||||
if (!exp_info->resv)
|
if (!exp_info->resv)
|
||||||
alloc_size += sizeof(struct reservation_object);
|
alloc_size += sizeof(struct reservation_object);
|
||||||
else
|
else
|
||||||
|
@ -553,7 +554,8 @@ int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, size_t start, size_t len,
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
if (dmabuf->ops->begin_cpu_access)
|
if (dmabuf->ops->begin_cpu_access)
|
||||||
ret = dmabuf->ops->begin_cpu_access(dmabuf, start, len, direction);
|
ret = dmabuf->ops->begin_cpu_access(dmabuf, start,
|
||||||
|
len, direction);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
@ -657,7 +659,7 @@ EXPORT_SYMBOL_GPL(dma_buf_kunmap);
|
||||||
* @dmabuf: [in] buffer that should back the vma
|
* @dmabuf: [in] buffer that should back the vma
|
||||||
* @vma: [in] vma for the mmap
|
* @vma: [in] vma for the mmap
|
||||||
* @pgoff: [in] offset in pages where this mmap should start within the
|
* @pgoff: [in] offset in pages where this mmap should start within the
|
||||||
* dma-buf buffer.
|
* dma-buf buffer.
|
||||||
*
|
*
|
||||||
* This function adjusts the passed in vma so that it points at the file of the
|
* This function adjusts the passed in vma so that it points at the file of the
|
||||||
* dma_buf operation. It also adjusts the starting pgoff and does bounds
|
* dma_buf operation. It also adjusts the starting pgoff and does bounds
|
||||||
|
@ -834,6 +836,7 @@ static int dma_buf_describe(struct seq_file *s)
|
||||||
static int dma_buf_show(struct seq_file *s, void *unused)
|
static int dma_buf_show(struct seq_file *s, void *unused)
|
||||||
{
|
{
|
||||||
void (*func)(struct seq_file *) = s->private;
|
void (*func)(struct seq_file *) = s->private;
|
||||||
|
|
||||||
func(s);
|
func(s);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -855,7 +858,9 @@ static struct dentry *dma_buf_debugfs_dir;
|
||||||
static int dma_buf_init_debugfs(void)
|
static int dma_buf_init_debugfs(void)
|
||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
dma_buf_debugfs_dir = debugfs_create_dir("dma_buf", NULL);
|
dma_buf_debugfs_dir = debugfs_create_dir("dma_buf", NULL);
|
||||||
|
|
||||||
if (IS_ERR(dma_buf_debugfs_dir)) {
|
if (IS_ERR(dma_buf_debugfs_dir)) {
|
||||||
err = PTR_ERR(dma_buf_debugfs_dir);
|
err = PTR_ERR(dma_buf_debugfs_dir);
|
||||||
dma_buf_debugfs_dir = NULL;
|
dma_buf_debugfs_dir = NULL;
|
||||||
|
|
|
@ -337,7 +337,8 @@ long reservation_object_wait_timeout_rcu(struct reservation_object *obj,
|
||||||
rcu_read_lock();
|
rcu_read_lock();
|
||||||
|
|
||||||
if (wait_all) {
|
if (wait_all) {
|
||||||
struct reservation_object_list *fobj = rcu_dereference(obj->fence);
|
struct reservation_object_list *fobj =
|
||||||
|
rcu_dereference(obj->fence);
|
||||||
|
|
||||||
if (fobj)
|
if (fobj)
|
||||||
shared_count = fobj->shared_count;
|
shared_count = fobj->shared_count;
|
||||||
|
@ -429,7 +430,8 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj,
|
||||||
if (test_all) {
|
if (test_all) {
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
struct reservation_object_list *fobj = rcu_dereference(obj->fence);
|
struct reservation_object_list *fobj =
|
||||||
|
rcu_dereference(obj->fence);
|
||||||
|
|
||||||
if (fobj)
|
if (fobj)
|
||||||
shared_count = fobj->shared_count;
|
shared_count = fobj->shared_count;
|
||||||
|
@ -462,7 +464,8 @@ bool reservation_object_test_signaled_rcu(struct reservation_object *obj,
|
||||||
goto unlock_retry;
|
goto unlock_retry;
|
||||||
|
|
||||||
if (fence_excl) {
|
if (fence_excl) {
|
||||||
ret = reservation_object_test_signaled_single(fence_excl);
|
ret = reservation_object_test_signaled_single(
|
||||||
|
fence_excl);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
goto unlock_retry;
|
goto unlock_retry;
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,24 +24,28 @@
|
||||||
static const char *seqno_fence_get_driver_name(struct fence *fence)
|
static const char *seqno_fence_get_driver_name(struct fence *fence)
|
||||||
{
|
{
|
||||||
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
||||||
|
|
||||||
return seqno_fence->ops->get_driver_name(fence);
|
return seqno_fence->ops->get_driver_name(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *seqno_fence_get_timeline_name(struct fence *fence)
|
static const char *seqno_fence_get_timeline_name(struct fence *fence)
|
||||||
{
|
{
|
||||||
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
||||||
|
|
||||||
return seqno_fence->ops->get_timeline_name(fence);
|
return seqno_fence->ops->get_timeline_name(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool seqno_enable_signaling(struct fence *fence)
|
static bool seqno_enable_signaling(struct fence *fence)
|
||||||
{
|
{
|
||||||
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
||||||
|
|
||||||
return seqno_fence->ops->enable_signaling(fence);
|
return seqno_fence->ops->enable_signaling(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool seqno_signaled(struct fence *fence)
|
static bool seqno_signaled(struct fence *fence)
|
||||||
{
|
{
|
||||||
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
struct seqno_fence *seqno_fence = to_seqno_fence(fence);
|
||||||
|
|
||||||
return seqno_fence->ops->signaled && seqno_fence->ops->signaled(fence);
|
return seqno_fence->ops->signaled && seqno_fence->ops->signaled(fence);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -56,9 +60,11 @@ static void seqno_release(struct fence *fence)
|
||||||
fence_free(&f->base);
|
fence_free(&f->base);
|
||||||
}
|
}
|
||||||
|
|
||||||
static signed long seqno_wait(struct fence *fence, bool intr, signed long timeout)
|
static signed long seqno_wait(struct fence *fence, bool intr,
|
||||||
|
signed long timeout)
|
||||||
{
|
{
|
||||||
struct seqno_fence *f = to_seqno_fence(fence);
|
struct seqno_fence *f = to_seqno_fence(fence);
|
||||||
|
|
||||||
return f->ops->wait(fence, intr, timeout);
|
return f->ops->wait(fence, intr, timeout);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue