From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: samples: rust: add Rust serial device bus sample device driver Date: Mon, 16 Mar 2026 12:17:35 +1000 Message-ID: In-Reply-To: <20260313-rust_serdev-v3-4-c9a3af214f7f@posteo.de> References: <20260313-rust_serdev-v3-0-c9a3af214f7f@posteo.de> <20260313-rust_serdev-v3-4-c9a3af214f7f@posteo.de> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Patch Review The sample is clean and demonstrates the API well. **Missing dependency in Kconfig:** ``` +config SAMPLE_RUST_DRIVER_SERDEV + tristate "Serial Device Bus Device Driver" + depends on SERIAL_DEV_BUS ``` This should also `depends on RUST_SERIAL_DEV_BUS_ABSTRACTIONS` (or `select`= it), since the sample uses `kernel::serdev` which is gated behind that con= fig option. **The sample stores an `ARef` but never uses it functionall= y:** ```rust +struct SampleDriver { + sdev: ARef, +} ``` It's only used in `Drop` for a debug message. This is fine for a sample, bu= t the reference counting should be correct =E2=80=94 `sdev.into()` in `prob= e` calls `impl_device_context_into_aref` which should increment the refcoun= t. **Minor: `"GPL v2"` vs `"GPL"`:** ```rust + license: "GPL v2", ``` Modern kernel modules typically use just `"GPL"`. `"GPL v2"` is also accept= ed but `"GPL"` is the recommended form. --- Generated by Claude Code Patch Reviewer