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: Re: [PATCH v3 2/4] serdev: add rust private data to serdev_device
Date: Mon, 16 Mar 2026 12:17:35 +1000	[thread overview]
Message-ID: <review-patch2-2026031402-absence-graph-af5d@gregkh> (raw)
In-Reply-To: <2026031402-absence-graph-af5d@gregkh>

Patch Review

```c
+	void *rust_private_data;
```

Adding a `void *` field to `struct serdev_device` purely for Rust abstraction use is somewhat controversial. This adds overhead to every `serdev_device` in the system, even when Rust is not used. 

**Concern:** Why not use the existing `dev_set_drvdata`/`dev_get_drvdata` mechanism for this? The patch series uses `dev_set_drvdata` for the driver's own data (`T`) and then needs this extra field for `PrivateData` (the completion/error pair). This suggests the abstraction design could be reworked to avoid needing two separate private data fields — for example, by wrapping the driver data and the completion together into a single struct stored via `dev_set_drvdata`.

The kdoc alignment changes are good cleanup (adding missing colons on `@write_comp:` and `@write_lock:`).

**Initialization concern:** The new `rust_private_data` field is never explicitly initialized in the C code that allocates `serdev_device`. It will be zero-initialized if the struct is allocated with `kzalloc`, but this should be documented or verified.

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-03-16  2:17 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-13 18:12 [PATCH v3 0/4] rust: add basic serial device bus abstractions Markus Probst
2026-03-13 18:12 ` [PATCH v3 1/4] rust: devres: return reference in `devres::register` Markus Probst
2026-03-16  2:17   ` Claude review: " Claude Code Review Bot
2026-03-13 18:12 ` [PATCH v3 2/4] serdev: add rust private data to serdev_device Markus Probst
2026-03-14  8:07   ` Greg Kroah-Hartman
2026-03-14 11:42     ` Markus Probst
2026-03-14 11:52       ` Greg Kroah-Hartman
2026-03-14 12:08         ` Markus Probst
2026-03-14 13:24           ` Alice Ryhl
2026-03-14 13:31           ` Greg Kroah-Hartman
2026-03-14 13:42             ` Danilo Krummrich
2026-03-14 13:49               ` Markus Probst
2026-03-14 13:54                 ` Danilo Krummrich
2026-03-14 14:58                   ` Markus Probst
2026-03-16  2:17     ` Claude Code Review Bot [this message]
2026-03-13 18:12 ` [PATCH v3 3/4] rust: add basic serial device bus abstractions Markus Probst
2026-03-16  2:17   ` Claude review: " Claude Code Review Bot
2026-03-13 18:12 ` [PATCH v3 4/4] samples: rust: add Rust serial device bus sample device driver Markus Probst
2026-03-16  2:17   ` Claude review: " Claude Code Review Bot
2026-03-16  2:17 ` Claude review: rust: add basic serial device bus abstractions Claude Code Review Bot

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-patch2-2026031402-absence-graph-af5d@gregkh \
    --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