From: Philipp Stanner <phasta@kernel.org>
To: Sumit Semwal <sumit.semwal@linaro.org>,
Christian König <christian.koenig@amd.com>
Cc: linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org, Philipp Stanner <phasta@kernel.org>
Subject: [PATCH] dma-fence: Use dma_fence_set_error() internally
Date: Wed, 3 Jun 2026 17:05:32 +0200 [thread overview]
Message-ID: <20260603150531.2217691-2-phasta@kernel.org> (raw)
The dma_fence implementation sets a fence error in dma_fence_release()
manually.
Make the code a bit more readable by using the appropriate API function
for that.
Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
Only compile-tested.
---
drivers/dma-buf/dma-fence.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/dma-buf/dma-fence.c b/drivers/dma-buf/dma-fence.c
index c7ea1e75d38a..ae5550cda421 100644
--- a/drivers/dma-buf/dma-fence.c
+++ b/drivers/dma-buf/dma-fence.c
@@ -599,7 +599,7 @@ void dma_fence_release(struct kref *kref)
* so that the callbacks know this signal is due to an error.
*/
dma_fence_lock_irqsave(fence, flags);
- fence->error = -EDEADLK;
+ dma_fence_set_error(fence, -EDEADLK);
dma_fence_signal_locked(fence);
dma_fence_unlock_irqrestore(fence, flags);
}
--
2.54.0
next reply other threads:[~2026-06-03 15:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-03 15:05 Philipp Stanner [this message]
2026-06-04 1:41 ` Claude review: dma-fence: Use dma_fence_set_error() internally Claude Code Review Bot
2026-06-04 1:41 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260603150531.2217691-2-phasta@kernel.org \
--to=phasta@kernel.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=sumit.semwal@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox