From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: References: X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review **All three hunks are correct.** **Hunk 1 =E2=80=94 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`, so `struct d= rm_device` is the correct type. This is the struct-level invariant, so accu= racy matters for anyone relying on it when writing `unsafe` code. **Hunk 2 =E2=80=94 Safety doc on `from_drm_device` (line 163 in tree):** ``` - /// `ptr` must be a valid pointer to a `struct device` embedded in `Se= lf`. + /// `ptr` must be a valid pointer to a `struct drm_device` embedded in= `Self`. ``` The function signature takes `*const bindings::drm_device`, and the interna= l `// SAFETY:` comment on line 166 already correctly says `struct drm_devic= e`. The doc comment was the only inconsistent part. **Hunk 3 =E2=80=94 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`, `p= tr` is pointing to, is ``` Same situation =E2=80=94 `ptr` is `*const bindings::drm_device`, and the fu= nction delegates to `from_drm_device`. The doc comment was the sole inconsi= stency. **No issues found.** The patch is correct, complete (all three erroneous in= stances are fixed), and the commit message is clear. The `Fixes:` tag corre= ctly references the commit that introduced the abstraction (and these comme= nts). --- Generated by Claude Code Patch Reviewer