dma-buf/fence: Sparse wants __rcu on the object itself
authorChris Wilson <[email protected]>
Thu, 2 Nov 2017 20:03:34 +0000 (22:03 +0200)
committerVille Syrjälä <[email protected]>
Thu, 9 Nov 2017 18:32:53 +0000 (20:32 +0200)
In order to silence sparse in dma_fence_get_rcu_safe(), we need to mark
the incoming fence object as being RCU protected and not the pointer to
the object.

Cc: Dave Airlie <[email protected]>
Cc: Jason Ekstrand <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Alex Deucher <[email protected]>
Cc: Christian König <[email protected]>
Cc: Sumit Semwal <[email protected]>
Signed-off-by: Chris Wilson <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Reviewed-by: Daniel Vetter <[email protected]>
Acked-by: Christian König <[email protected]>
Acked-by: Sumit Semwal <[email protected]>
[vsyrjala: s/silent/silence/ in commit message]
Signed-off-by: Ville Syrjälä <[email protected]>
include/linux/dma-fence.h

index efdabbb64e3c7ef32872ebe33a20b07a51536842..4c008170fe653d9a939356f512f1b6530703f1f2 100644 (file)
@@ -242,7 +242,7 @@ static inline struct dma_fence *dma_fence_get_rcu(struct dma_fence *fence)
  * The caller is required to hold the RCU read lock.
  */
 static inline struct dma_fence *
-dma_fence_get_rcu_safe(struct dma_fence * __rcu *fencep)
+dma_fence_get_rcu_safe(struct dma_fence __rcu **fencep)
 {
        do {
                struct dma_fence *fence;