Commit 14374e3e authored by Christian König's avatar Christian König

dma-buf: cleanup dma_fence_chain_walk

Use unrcu_pointer() instead of the manual cast.
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20220518085446.31338-1-christian.koenig@amd.com
parent ade1fc91
...@@ -62,8 +62,8 @@ struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence) ...@@ -62,8 +62,8 @@ struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence)
replacement = NULL; replacement = NULL;
} }
tmp = cmpxchg((struct dma_fence __force **)&chain->prev, tmp = unrcu_pointer(cmpxchg(&chain->prev, RCU_INITIALIZER(prev),
prev, replacement); RCU_INITIALIZER(replacement)));
if (tmp == prev) if (tmp == prev)
dma_fence_put(tmp); dma_fence_put(tmp);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment