From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: rust: types: Add Ownable/Owned types Date: Fri, 27 Feb 2026 15:11:56 +1000 Message-ID: In-Reply-To: <20260224-unique-ref-v16-2-c21afcb118d3@kernel.org> References: <20260224-unique-ref-v16-0-c21afcb118d3@kernel.org> <20260224-unique-ref-v16-2-c21afcb118d3@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review This is the central patch. The design is sound. **Minor typo** at line 859 (in `Owned::from_raw`): ```rust // INVARIANT: By funvtion safety requirement we satisfy the first invariant= of `Self`. ``` "funvtion" should be "function". **Trailing `//` markers**: Throughout this patch and others, there are trai= ling `//` comments used as rustfmt anchors to force one-item-per-line forma= tting: ```rust use core::{ mem::ManuallyDrop, ops::{ Deref, DerefMut, // }, pin::Pin, ptr::NonNull, // }; ``` This is a known pattern in the kernel Rust tree, but it's still worth notin= g that it creates visual noise. This is a project-level style decision and = not a blocker. **`Ownable::release` safety**: The trait is safe to implement but `release`= is `unsafe fn` =E2=80=94 this is the correct pattern. The safety requireme= nt ("callers must ensure exclusive ownership transferable to `release`") is= well-documented. The `Owned::drop` impl satisfies this because `&mut se= lf` in `drop` guarantees exclusive access. **`DerefMut` bound on `Unpin`**: The decision to only provide `DerefMut` fo= r `T: Unpin` is correct =E2=80=94 it prevents moving out of pinned types th= rough `&mut T`. --- Generated by Claude Code Patch Reviewer