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: video: cirrusfb: Make use of struct zorro_device_id::driver_data_ptr
Date: Wed, 27 May 2026 14:47:33 +1000	[thread overview]
Message-ID: <review-patch8-72b515651ab8df2f464deb620fd7b24370d6fb1a.1779803053.git.u.kleine-koenig@baylibre.com> (raw)
In-Reply-To: <72b515651ab8df2f464deb620fd7b24370d6fb1a.1779803053.git.u.kleine-koenig@baylibre.com>

Patch Review

**Status: Looks good.**

This patch converts cirrusfb to use the new `driver_data_ptr` field. The table initialization changes from:

```c
-		.driver_data	= (unsigned long)&zcl_sd64,
+		.driver_data_ptr = &zcl_sd64,
```

And the consumption site changes from:

```c
-	zcl = (const struct zorrocl *)ent->driver_data;
+	zcl = ent->driver_data_ptr;
```

Both directions of the conversion are correct:

1. **Initialization side:** Drops the `(unsigned long)` cast. The `const struct zorrocl *` is implicitly converted to `const void *` — this is safe and preserves const.

2. **Usage side:** `ent->driver_data_ptr` is `const void *`, which is implicitly converted to `const struct zorrocl *` in the assignment to `zcl`. This is valid C and preserves the const qualifier that was previously being explicitly cast (actually correctly in the old code, but the cast was fragile — e.g., if someone changed the type of `zcl`, the old `(const struct zorrocl *)` cast would silently hide any mismatch).

3. **Terminator cleanup:** `{ 0 }` → `{ }` is consistent with patch 5.

4. **Alignment reformatting:** The patch also drops the column-aligned `=` signs (e.g., `.id\t\t=` → `.id =`). This is a minor style preference; the kernel doesn't mandate column alignment in struct initializers, so this is fine as a drive-by cleanup.

No concerns.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-27  4:47 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-26 14:17 [PATCH v1 0/8] zorro: Improve handling of pointers in zorro_device_id::driver_data Uwe Kleine-König (The Capable Hub)
2026-05-26 14:17 ` [PATCH v1 5/8] video: fm2fb: Use named initializer for zorro_device_id array Uwe Kleine-König (The Capable Hub)
2026-05-27  4:47   ` Claude review: " Claude Code Review Bot
2026-05-26 14:17 ` [PATCH v1 6/8] zorro: Simplify storing pointers in device id struct Uwe Kleine-König (The Capable Hub)
2026-05-27  4:47   ` Claude review: " Claude Code Review Bot
2026-05-26 14:17 ` [PATCH v1 8/8] video: cirrusfb: Make use of struct zorro_device_id::driver_data_ptr Uwe Kleine-König (The Capable Hub)
2026-05-27  4:47   ` Claude Code Review Bot [this message]
2026-05-26 15:01 ` [PATCH v1 0/8] zorro: Improve handling of pointers in zorro_device_id::driver_data Geert Uytterhoeven
2026-05-26 16:38   ` Uwe Kleine-König (The Capable Hub)
2026-05-27  4:47 ` Claude review: " 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-patch8-72b515651ab8df2f464deb620fd7b24370d6fb1a.1779803053.git.u.kleine-koenig@baylibre.com \
    --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