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: add basic serial device bus abstractions Date: Thu, 04 Jun 2026 15:18:43 +1000 Message-ID: In-Reply-To: <20260530-rust_serdev-v10-0-65d1d5db876c@posteo.de> References: <20260530-rust_serdev-v10-0-65d1d5db876c@posteo.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: rust: add basic serial device bus abstractions Author: Markus Probst Patches: 6 Reviewed: 2026-06-04T15:18:43.045766 --- This is a v10 patch series adding Rust abstractions for the Linux serial device bus (serdev). The series is well-structured across 5 patches: a preparatory devres change, a C-side struct modification, the main Rust abstraction, a sample driver, and a MAINTAINERS update. The overall design follows established Rust-for-Linux patterns: a `Driver` trait with vtable callbacks, a transparent `Device` wrapper with type-state (`Core`, `Bound`, `Normal`), and an `Adapter` bridging `RegistrationOps`. The `PrivateData` mutex approach for guarding `receive_buf` against use-after-free on the driver data during teardown is a reasonable solution, though it introduces per-callback locking overhead. The code is generally clean and well-documented. I have a handful of concerns below, mostly around the `devres::register` safety argument, a typo, and a few minor API design questions. --- --- Generated by Claude Code Patch Reviewer