From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: Re: [PATCH] rust: drm: fix incorrect type name in `Device` doc comment
Date: Tue, 05 May 2026 11:51:05 +1000 [thread overview]
Message-ID: <review-patch1-afG_YvuNAk26YLnV@google.com> (raw)
In-Reply-To: <afG_YvuNAk26YLnV@google.com>
Patch Review
**All three hunks are correct.**
**Hunk 1 — Invariant comment (line 75 in tree):**
```
-/// `self.dev` is a valid instance of a `struct device`.
+/// `self.dev` is a valid instance of a `struct drm_device`.
```
The `dev` field is declared as `Opaque<bindings::drm_device>`, so `struct drm_device` is the correct type. This is the struct-level invariant, so accuracy matters for anyone relying on it when writing `unsafe` code.
**Hunk 2 — Safety doc on `from_drm_device` (line 163 in tree):**
```
- /// `ptr` must be a valid pointer to a `struct device` embedded in `Self`.
+ /// `ptr` must be a valid pointer to a `struct drm_device` embedded in `Self`.
```
The function signature takes `*const bindings::drm_device`, and the internal `// SAFETY:` comment on line 166 already correctly says `struct drm_device`. The doc comment was the only inconsistent part.
**Hunk 3 — Safety doc on `from_raw` (line 187 in tree):**
```
- /// Additionally, callers must ensure that the `struct device`, `ptr` is pointing to, is
+ /// Additionally, callers must ensure that the `struct drm_device`, `ptr` is pointing to, is
```
Same situation — `ptr` is `*const bindings::drm_device`, and the function delegates to `from_drm_device`. The doc comment was the sole inconsistency.
**No issues found.** The patch is correct, complete (all three erroneous instances are fixed), and the commit message is clear. The `Fixes:` tag correctly references the commit that introduced the abstraction (and these comments).
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-05 1:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 5:08 [PATCH] rust: drm: fix incorrect type name in `Device` doc comment Hsiu Che Yu
2026-04-29 8:20 ` Alice Ryhl
2026-05-05 1:51 ` Claude Code Review Bot [this message]
2026-05-05 1:51 ` 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-patch1-afG_YvuNAk26YLnV@google.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