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: driver: make Adapter trait lifetime-parameterized Date: Thu, 07 May 2026 13:02:04 +1000 Message-ID: In-Reply-To: <20260506215113.851360-5-dakr@kernel.org> References: <20260506215113.851360-1-dakr@kernel.org> <20260506215113.851360-5-dakr@kernel.org> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review Clean refactoring of the `Adapter` trait. The `id_info`, `of_id_info`, and `acpi_id_info` methods now take `&'bound Device` and return `&'bound Self::IdInfo`, tying the info lifetime to the device binding scope. No issues found. ### PATCHES 5-8: implement Sync for Device\ (pci, platform, auxiliary, usb) All four patches follow the same pattern: ```rust // SAFETY: Same as `Device` -- the underlying `struct [bus]_device` is the same; // `Bound` is a zero-sized type-state marker that does not affect thread safety. unsafe impl Sync for Device {} ``` This is needed because `&'bound Device` stored in a driver struct must be `Send` (the struct itself must be `Send`), which requires `Device: Sync`. The safety reasoning is correct -- `Bound` is purely a type-state phantom and doesn't add any `!Sync` fields. These should mirror whatever safety argument was made for `Sync for Device` on each bus. No issues found. --- Generated by Claude Code Patch Reviewer