diff options
author | Jagan Teki <jteki@openedev.com> | 2015-05-20 15:39:31 -0400 |
---|---|---|
committer | Sumit Semwal <sumit.semwal@linaro.org> | 2015-05-21 01:59:59 -0400 |
commit | 5136629dc5a19701746abd7c8ad98ce0b84dda1d (patch) | |
tree | 4e515e62fdc1532188c77e997ac577b98017b9de | |
parent | 9abdffe286c1532a54d5aee31571d3029be4026c (diff) |
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>
-rw-r--r-- | drivers/dma-buf/dma-buf.c | 9 | ||||
-rw-r--r-- | drivers/dma-buf/reservation.c | 9 | ||||
-rw-r--r-- | drivers/dma-buf/seqno-fence.c | 8 |
3 files changed, 20 insertions, 6 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 63a9914e42b8..155c1464948e 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c | |||
@@ -287,6 +287,7 @@ struct dma_buf *dma_buf_export(const struct dma_buf_export_info *exp_info) | |||
287 | struct reservation_object *resv = exp_info->resv; | 287 | struct reservation_object *resv = exp_info->resv; |
288 | struct file *file; | 288 | struct file *file; |
289 | size_t alloc_size = sizeof(struct dma_buf); | 289 | size_t alloc_size = sizeof(struct dma_buf); |
290 | |||
290 | if (!exp_info->resv) | 291 | if (!exp_info->resv) |
291 | alloc_size += sizeof(struct reservation_object); | 292 | alloc_size += sizeof(struct reservation_object); |
292 | else | 293 | else |
@@ -553,7 +554,8 @@ int dma_buf_begin_cpu_access(struct dma_buf *dmabuf, size_t start, size_t len, | |||
553 | return -EINVAL; | 554 | return -EINVAL; |
554 | 555 | ||
555 | if (dmabuf->ops->begin_cpu_access) | 556 | if (dmabuf->ops->begin_cpu_access) |
556 | ret = dmabuf->ops->begin_cpu_access(dmabuf, start, len, direction); | 557 | ret = dmabuf->ops->begin_cpu_access(dmabuf, start, |
558 | len, direction); | ||
557 | 559 | ||
558 | return ret; | 560 | return ret; |
559 | } | 561 | } |
@@ -657,7 +659,7 @@ EXPORT_SYMBOL_GPL(dma_buf_kunmap); | |||
657 | * @dmabuf: [in] buffer that should back the vma | 659 | * @dmabuf: [in] buffer that should back the vma |
658 | * @vma: [in] vma for the mmap | 660 | * @vma: [in] vma for the mmap |
659 | * @pgoff: [in] offset in pages where this mmap should start within the | 661 | * @pgoff: [in] offset in pages where this mmap should start within the |
660 | * dma-buf buffer. | 662 | * dma-buf buffer. |
661 | * | 663 | * |
662 | * This function adjusts the passed in vma so that it points at the file of the | 664 | * This function adjusts the passed in vma so that it points at the file of the |
663 | * dma_buf operation. It also adjusts the starting pgoff and does bounds | 665 | * 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) | |||
834 | static int dma_buf_show(struct seq_file *s, void *unused) | 836 | static int dma_buf_show(struct seq_file *s, void *unused) |
835 | { | 837 | { |
836 | void (*func)(struct seq_file *) = s->private; | 838 | void (*func)(struct seq_file *) = s->private; |
839 | |||
837 | func(s); | 840 | func(s); |
838 | return 0; | 841 | return 0; |
839 | } | 842 | } |
@@ -855,7 +858,9 @@ static struct dentry *dma_buf_debugfs_dir; | |||
855 | static int dma_buf_init_debugfs(void) | 858 | static int dma_buf_init_debugfs(void) |
856 | { | 859 | { |
857 | int err = 0; | 860 | int err = 0; |
861 | |||
858 | dma_buf_debugfs_dir = debugfs_create_dir("dma_buf", NULL); | 862 | dma_buf_debugfs_dir = debugfs_create_dir("dma_buf", NULL); |
863 | |||
859 | if (IS_ERR(dma_buf_debugfs_dir)) { | 864 | if (IS_ERR(dma_buf_debugfs_dir)) { |
860 | err = PTR_ERR(dma_buf_debugfs_dir); | 865 | err = PTR_ERR(dma_buf_debugfs_dir); |
861 | dma_buf_debugfs_dir = NULL; | 866 | dma_buf_debugfs_dir = NULL; |
diff --git a/drivers/dma-buf/reservation.c b/drivers/dma-buf/reservation.c index 39920d77f288..c0bd5722c997 100644 --- a/drivers/dma-buf/reservation.c +++ b/drivers/dma-buf/reservation.c | |||
@@ -337,7 +337,8 @@ retry: | |||
337 | rcu_read_lock(); | 337 | rcu_read_lock(); |
338 | 338 | ||
339 | if (wait_all) { | 339 | if (wait_all) { |
340 | struct reservation_object_list *fobj = rcu_dereference(obj->fence); | 340 | struct reservation_object_list *fobj = |
341 | rcu_dereference(obj->fence); | ||
341 | 342 | ||
342 | if (fobj) | 343 | if (fobj) |
343 | shared_count = fobj->shared_count; | 344 | shared_count = fobj->shared_count; |
@@ -429,7 +430,8 @@ retry: | |||
429 | if (test_all) { | 430 | if (test_all) { |
430 | unsigned i; | 431 | unsigned i; |
431 | 432 | ||
432 | struct reservation_object_list *fobj = rcu_dereference(obj->fence); | 433 | struct reservation_object_list *fobj = |
434 | rcu_dereference(obj->fence); | ||
433 | 435 | ||
434 | if (fobj) | 436 | if (fobj) |
435 | shared_count = fobj->shared_count; | 437 | shared_count = fobj->shared_count; |
@@ -462,7 +464,8 @@ retry: | |||
462 | goto unlock_retry; | 464 | goto unlock_retry; |
463 | 465 | ||
464 | if (fence_excl) { | 466 | if (fence_excl) { |
465 | ret = reservation_object_test_signaled_single(fence_excl); | 467 | ret = reservation_object_test_signaled_single( |
468 | fence_excl); | ||
466 | if (ret < 0) | 469 | if (ret < 0) |
467 | goto unlock_retry; | 470 | goto unlock_retry; |
468 | } | 471 | } |
diff --git a/drivers/dma-buf/seqno-fence.c b/drivers/dma-buf/seqno-fence.c index 7d12a39a4b57..71127f8f1626 100644 --- a/drivers/dma-buf/seqno-fence.c +++ b/drivers/dma-buf/seqno-fence.c | |||
@@ -24,24 +24,28 @@ | |||
24 | static const char *seqno_fence_get_driver_name(struct fence *fence) | 24 | static const char *seqno_fence_get_driver_name(struct fence *fence) |
25 | { | 25 | { |
26 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); | 26 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); |
27 | |||
27 | return seqno_fence->ops->get_driver_name(fence); | 28 | return seqno_fence->ops->get_driver_name(fence); |
28 | } | 29 | } |
29 | 30 | ||
30 | static const char *seqno_fence_get_timeline_name(struct fence *fence) | 31 | static const char *seqno_fence_get_timeline_name(struct fence *fence) |
31 | { | 32 | { |
32 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); | 33 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); |
34 | |||
33 | return seqno_fence->ops->get_timeline_name(fence); | 35 | return seqno_fence->ops->get_timeline_name(fence); |
34 | } | 36 | } |
35 | 37 | ||
36 | static bool seqno_enable_signaling(struct fence *fence) | 38 | static bool seqno_enable_signaling(struct fence *fence) |
37 | { | 39 | { |
38 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); | 40 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); |
41 | |||
39 | return seqno_fence->ops->enable_signaling(fence); | 42 | return seqno_fence->ops->enable_signaling(fence); |
40 | } | 43 | } |
41 | 44 | ||
42 | static bool seqno_signaled(struct fence *fence) | 45 | static bool seqno_signaled(struct fence *fence) |
43 | { | 46 | { |
44 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); | 47 | struct seqno_fence *seqno_fence = to_seqno_fence(fence); |
48 | |||
45 | return seqno_fence->ops->signaled && seqno_fence->ops->signaled(fence); | 49 | return seqno_fence->ops->signaled && seqno_fence->ops->signaled(fence); |
46 | } | 50 | } |
47 | 51 | ||
@@ -56,9 +60,11 @@ static void seqno_release(struct fence *fence) | |||
56 | fence_free(&f->base); | 60 | fence_free(&f->base); |
57 | } | 61 | } |
58 | 62 | ||
59 | static signed long seqno_wait(struct fence *fence, bool intr, signed long timeout) | 63 | static signed long seqno_wait(struct fence *fence, bool intr, |
64 | signed long timeout) | ||
60 | { | 65 | { |
61 | struct seqno_fence *f = to_seqno_fence(fence); | 66 | struct seqno_fence *f = to_seqno_fence(fence); |
67 | |||
62 | return f->ops->wait(fence, intr, timeout); | 68 | return f->ops->wait(fence, intr, timeout); |
63 | } | 69 | } |
64 | 70 | ||