summaryrefslogtreecommitdiff
path: root/drivers/dma-buf
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2022-05-11 18:40:38 +0300
committerChristian König <christian.koenig@amd.com>2022-05-30 12:24:50 +0300
commit14374e3eee1b02dbf162e1dd75b789373f07ef43 (patch)
tree67e702ca8f8e684cc55ebf8328628a5319c83f99 /drivers/dma-buf
parentade1fc91eb99614c7155fec762ad5761bb470e06 (diff)
downloadlinux-14374e3eee1b02dbf162e1dd75b789373f07ef43.tar.xz
dma-buf: cleanup dma_fence_chain_walk
Use unrcu_pointer() instead of the manual cast. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/20220518085446.31338-1-christian.koenig@amd.com
Diffstat (limited to 'drivers/dma-buf')
-rw-r--r--drivers/dma-buf/dma-fence-chain.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/dma-buf/dma-fence-chain.c b/drivers/dma-buf/dma-fence-chain.c
index 06f8ef97c6e8..a0d920576ba6 100644
--- a/drivers/dma-buf/dma-fence-chain.c
+++ b/drivers/dma-buf/dma-fence-chain.c
@@ -62,8 +62,8 @@ struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)
replacement = NULL;
}
- tmp = cmpxchg((struct dma_fence __force **)&chain->prev,
- prev, replacement);
+ tmp = unrcu_pointer(cmpxchg(&chain->prev, RCU_INITIALIZER(prev),
+ RCU_INITIALIZER(replacement)));
if (tmp == prev)
dma_fence_put(tmp);
else