From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/gem/shmem: Introduce __drm_gem_shmem_free_sgt_locked()
Date: Wed, 27 May 2026 14:05:18 +1000 [thread overview]
Message-ID: <review-patch4-20260526212857.1158294-5-lyude@redhat.com> (raw)
In-Reply-To: <20260526212857.1158294-5-lyude@redhat.com>
Patch Review
**Status: Issue found**
The extracted helper is correct in logic — it moves the unmap/free/kfree sequence into a standalone function that asserts the resv lock is held:
```c
+void __drm_gem_shmem_free_sgt_locked(struct drm_gem_shmem_object *shmem)
+{
+ dma_resv_assert_held(shmem->base.resv);
+
+ dma_unmap_sgtable(shmem->base.dev->dev, shmem->sgt, DMA_BIDIRECTIONAL, 0);
+ sg_free_table(shmem->sgt);
+ kfree(shmem->sgt);
+ shmem->sgt = NULL;
+}
```
**Issue: Kerneldoc name mismatch.** The doc comment says `__drm_gem_shmem_release_sgt_locked` but the function is named `__drm_gem_shmem_free_sgt_locked`:
```c
+ * __drm_gem_shmem_release_sgt_locked - Unpin and DMA unmap pages...
```
This will produce a kernel-doc warning. The V10 changelog mentions "Fix incorrect function name in documentation" but the mismatch persists — it seems the fix was applied in the wrong direction (or partially).
The refactoring of `drm_gem_shmem_release` to call the new helper is correct — the `if (shmem->sgt)` guard is preserved in the caller.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-27 4:05 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-26 21:28 [PATCH v14 0/6] rust: drm: gem: shmem: Add sg_table() function Lyude Paul
2026-05-26 21:28 ` [PATCH v14 1/6] rust: faux: Allow retrieving a bound Device Lyude Paul
2026-05-27 4:05 ` Claude review: " Claude Code Review Bot
2026-05-26 21:28 ` [PATCH v14 2/6] rust: gem: shmem: Fix Default implementation for ObjectConfig Lyude Paul
2026-05-27 4:05 ` Claude review: " Claude Code Review Bot
2026-05-26 21:28 ` [PATCH v14 3/6] rust: drm: gem: s/device::Device/Device/ for shmem.rs Lyude Paul
2026-05-27 4:05 ` Claude review: " Claude Code Review Bot
2026-05-26 21:28 ` [PATCH v14 4/6] drm/gem/shmem: Introduce __drm_gem_shmem_free_sgt_locked() Lyude Paul
2026-05-27 4:05 ` Claude Code Review Bot [this message]
2026-05-26 21:28 ` [PATCH v14 5/6] rust: drm: gem/shmem: Add DmaResvGuard helper Lyude Paul
2026-05-27 4:05 ` Claude review: " Claude Code Review Bot
2026-05-26 21:28 ` [PATCH v14 6/6] rust: drm: gem: Introduce shmem::Object::sg_table() Lyude Paul
2026-05-27 4:05 ` Claude review: " Claude Code Review Bot
2026-05-27 4:05 ` Claude review: rust: drm: gem: shmem: Add sg_table() function Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-04-21 23:52 [PATCH v12 0/5] Rust bindings for gem shmem Lyude Paul
2026-04-21 23:52 ` [PATCH v12 2/5] drm/gem/shmem: Introduce __drm_gem_shmem_free_sgt_locked() Lyude Paul
2026-04-22 22:05 ` Claude review: " Claude Code Review Bot
2026-04-21 23:40 [PATCH v11 0/5] Rust bindings for gem shmem Lyude Paul
2026-04-21 23:40 ` [PATCH v11 2/5] drm/gem/shmem: Introduce __drm_gem_shmem_free_sgt_locked() Lyude Paul
2026-04-22 22:09 ` Claude review: " Claude Code Review Bot
2026-04-09 0:12 [PATCH v10 0/5] Rust bindings for gem shmem Lyude Paul
2026-04-09 0:12 ` [PATCH v10 2/5] drm/gem/shmem: Introduce __drm_gem_shmem_free_sgt_locked() Lyude Paul
2026-04-12 2:01 ` Claude review: " 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=review-patch4-20260526212857.1158294-5-lyude@redhat.com \
--to=claude-review@example.com \
--cc=dri-devel-reviews@example.com \
/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