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: io: generalize `MmioRaw` to pointer to arbitrary type Date: Thu, 23 Apr 2026 08:25:44 +1000 Message-ID: In-Reply-To: <20260421-io_projection-v2-1-4c251c692ef4@garyguo.net> References: <20260421-io_projection-v2-0-4c251c692ef4@garyguo.net> <20260421-io_projection-v2-1-4c251c692ef4@garyguo.net> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Introduces the `Region` DST and makes `MmioRaw` generic over `T: ?Sized`. The old `MmioRaw` becomes `MmioRaw>`. The `Send`/`Sync` impls are appropriate since `MmioRaw` only stores an address: ```rust // SAFETY: `MmioRaw` is just an address, so is thread-safe. unsafe impl Send for MmioRaw {} unsafe impl Sync for MmioRaw {} ``` The use of `core::ptr::without_provenance_mut` is correct for I/O addresses that are not in normal memory. The `new_region` constructor properly checks `size < SIZE` before constructing the fat pointer via `slice_from_raw_parts_mut`. Clean patch, no issues. --- Generated by Claude Code Patch Reviewer