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/tegra: hdmi: Open-code drm_simple_encoder_init()
Date: Sat, 16 May 2026 12:11:38 +1000	[thread overview]
Message-ID: <review-patch2-20260513100501.6468-1-souradiptodas6@gmail.com> (raw)
In-Reply-To: <20260513100501.6468-1-souradiptodas6@gmail.com>

Patch Review

This is the version that should be considered for merge.

**Include changes (correct):**
```c
+#include <drm/drm_encoder.h>
...
-#include <drm/drm_simple_kms_helper.h>
```
The new include for `drm_encoder.h` is needed to provide `drm_encoder_init()` and `drm_encoder_cleanup()` declarations directly, and the alphabetical sort order is maintained. The stray blank line from v1 is fixed.

**New encoder funcs struct:**
```c
+static const struct drm_encoder_funcs tegra_hdmi_encoder_funcs = {
+	.destroy = drm_encoder_cleanup,
+};
```
This correctly replicates what `drm_simple_encoder_init()` provided internally. The struct is `static const`, which is the standard pattern.

**Minor style nit:** The struct is placed immediately after the closing `};` of `tegra124_tmds_config[]` on line 373 with no blank line separator. Kernel style typically has a blank line between top-level definitions. This was present in v1 too and wasn't addressed in v2's changelog.

**Call site change (correct):**
```c
-	drm_simple_encoder_init(drm, &hdmi->output.encoder,
-				DRM_MODE_ENCODER_TMDS);
+	drm_encoder_init(drm, &hdmi->output.encoder, &tegra_hdmi_encoder_funcs,
+				DRM_MODE_ENCODER_TMDS, NULL);
```
The `NULL` name parameter matches what `drm_simple_encoder_init()` passes internally. The return value of `drm_encoder_init()` is not checked, but this is consistent with the existing code — `drm_simple_encoder_init()`'s return was also being silently discarded. This is a pre-existing issue across all tegra encoder init paths (`rgb.c:308`, `dsi.c:1058`, `sor.c:3084`), and fixing it is outside the scope of this cleanup.

**Overall for v2:** Correct, minimal, no functional change. One optional nit about a missing blank line before the new struct definition. Suitable for merge as-is.

---
Generated by Claude Code Patch Reviewer

  reply	other threads:[~2026-05-16  2:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-02 14:34 [PATCH] drm/tegra: hdmi: Open-code drm_simple_encoder_init() Souradipto Das
2026-05-13 10:05 ` [PATCH v2] " Souradipto Das
2026-05-16  2:11   ` Claude Code Review Bot [this message]
2026-05-16  2:11 ` Claude review: " Claude Code Review Bot
2026-05-16  2:11 ` 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-20260513100501.6468-1-souradiptodas6@gmail.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