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: drm/radeon/radeon_connectors: remove radeon_connector_free_edid
Date: Mon, 25 May 2026 17:37:45 +1000	[thread overview]
Message-ID: <review-patch2-20260523142748.50034-3-jpeisach@ubuntu.com> (raw)
In-Reply-To: <20260523142748.50034-3-jpeisach@ubuntu.com>

Patch Review

**Approach:** Removes the `radeon_connector_free_edid()` helper and replaces all call sites with inline `drm_edid_free()` + NULL assignment. This is the right thing to do since `drm_edid_free()` is a standard API function.

**The transformation is mechanical and correct** — every call site is replaced with the same two-line pattern:

```c
drm_edid_free(radeon_connector->edid);
radeon_connector->edid = NULL;
```

**Minor observation:** The NULL assignment after `drm_edid_free()` is good practice but is technically unnecessary in the `radeon_connector_destroy()` path since the connector struct itself is about to be freed. Not worth changing, just noting.

**Ordering concern:** As mentioned above, this patch fixes the correctness problem created by patch 1 (where `kfree` was being called on `struct drm_edid *`). The series would be cleaner if either: (a) patch 1 updates `radeon_connector_free_edid` to use `drm_edid_free()` internally, or (b) the two patches are squashed. As submitted, bisecting to the state after only patch 1 produces broken code.

---

**Summary:** The API migration is correctly done and the final state after both patches is correct. The main concern is the bisectability issue: after patch 1 alone, `kfree()` is called on `const struct drm_edid *`, which is both a memory leak (inner edid not freed) and a const-correctness violation. Recommend either squashing or fixing the `radeon_connector_free_edid` body in patch 1.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-25  7:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-23 14:27 [PATCH NEXT 0/2] drm/radeon/radeon_connectors: use struct drm_edid Joshua Peisach
2026-05-23 14:27 ` [PATCH NEXT 1/2] drm/radeon/radeon_connectors: use struct drm_edid instead of struct edid Joshua Peisach
2026-05-23 14:39   ` Joshua Peisach
2026-05-25  7:37   ` Claude review: " Claude Code Review Bot
2026-05-23 14:27 ` [PATCH NEXT 2/2] drm/radeon/radeon_connectors: remove radeon_connector_free_edid Joshua Peisach
2026-05-25  7:37   ` Claude Code Review Bot [this message]
2026-05-25  7:37 ` Claude review: drm/radeon/radeon_connectors: use struct drm_edid 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-20260523142748.50034-3-jpeisach@ubuntu.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