From: Chris Wilson Date: Thu, 2 Nov 2017 20:03:34 +0000 (+0200) Subject: dma-buf/fence: Sparse wants __rcu on the object itself X-Git-Tag: v4.16-rc1~96^2~32^2~54 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=5f72db59160c697d1dec3f6074dba72bd834c695;p=linux.git dma-buf/fence: Sparse wants __rcu on the object itself 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 Cc: Jason Ekstrand Cc: linaro-mm-sig@lists.linaro.org Cc: linux-media@vger.kernel.org Cc: Alex Deucher Cc: Christian König Cc: Sumit Semwal Signed-off-by: Chris Wilson Link: https://patchwork.freedesktop.org/patch/msgid/20171102200336.23347-3-ville.syrjala@linux.intel.com Reviewed-by: Daniel Vetter Acked-by: Christian König Acked-by: Sumit Semwal [vsyrjala: s/silent/silence/ in commit message] Signed-off-by: Ville Syrjälä --- diff --git a/include/linux/dma-fence.h b/include/linux/dma-fence.h index efdabbb64e3c..4c008170fe65 100644 --- a/include/linux/dma-fence.h +++ b/include/linux/dma-fence.h @@ -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;