public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: rust: auxiliary: replace drvdata() with registration data
Date: Tue, 28 Apr 2026 13:51:40 +1000	[thread overview]
Message-ID: <review-overall-20260427221002.2143861-1-dakr@kernel.org> (raw)
In-Reply-To: <20260427221002.2143861-1-dakr@kernel.org>

Overall Series Review

Subject: rust: auxiliary: replace drvdata() with registration data
Author: Danilo Krummrich <dakr@kernel.org>
Patches: 4
Reviewed: 2026-04-28T13:51:40.253354

---

This is a well-designed 2-patch series that replaces the general-purpose `drvdata()` mechanism for inter-driver data sharing with a purpose-built `registration_data` pointer on `struct auxiliary_device`. The architectural rationale is sound: by tying the shared data to the auxiliary device registration rather than the parent driver's drvdata, the lifetime constraints become structural (enforced by the type system and drop ordering) rather than conventional.

The `TypeId`-based runtime type checking via a `#[repr(C)]` wrapper is a clean pattern that preserves memory safety while allowing type-erased storage in the C struct. The drop ordering in `Registration::drop()` — delete device first (unbinding the child), then free data, then uninit — correctly ensures no concurrent access to the registration data after it's freed.

The series is correct and clean. I have a few minor observations but no blocking issues.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-04-28  3:51 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-27 22:09 [PATCH 0/2] rust: auxiliary: replace drvdata() with registration data Danilo Krummrich
2026-04-27 22:09 ` [PATCH 1/2] rust: auxiliary: add registration data to auxiliary devices Danilo Krummrich
2026-04-28  3:51   ` Claude review: " Claude Code Review Bot
2026-04-27 22:09 ` [PATCH 2/2] rust: driver core: remove drvdata() and driver_type Danilo Krummrich
2026-04-28  3:51   ` Claude review: " Claude Code Review Bot
2026-04-27 22:14 ` [PATCH 0/2] rust: auxiliary: replace drvdata() with registration data Danilo Krummrich
2026-04-28  3:51 ` Claude Code Review Bot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=review-overall-20260427221002.2143861-1-dakr@kernel.org \
    --to=claude-review@example.com \
    --cc=dri-devel-reviews@example.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox