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/edid: extract section header processing into helper
Date: Mon, 25 May 2026 22:19:21 +1000	[thread overview]
Message-ID: <review-patch1-20260520021432.1301326-2-chen-yu.chen@amd.com> (raw)
In-Reply-To: <20260520021432.1301326-2-chen-yu.chen@amd.com>

Patch Review

**Purpose:** Refactors `update_displayid_info()` to extract the header processing into `drm_displayid_process_section_header()`, removes the `break` so the iterator can walk all blocks.

**Correctness:** The logic is preserved correctly. The `header_processed` flag ensures the header is processed only once, and removing the `break` is necessary for Patch 2 to iterate to the Display Parameters block.

**Style issues:** The new helper has inconsistent indentation compared to the original code and kernel coding style:

```c
	drm_dbg_kms(connector->dev,
			"[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
			connector->base.id, connector->name,
```

The format string arguments should align with the opening parenthesis of `drm_dbg_kms`, as the original code did:

```c
		    "[CONNECTOR:%d:%s] DisplayID extension version 0x%02x, primary use 0x%02x\n",
```

Similarly, the `if` condition:

```c
	if (displayid_version(iter) == DISPLAY_ID_STRUCTURE_VER_20 &&
		(displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
			displayid_primary_use(iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
```

The original code had proper alignment with the condition on the `if`:

```c
	    (displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_VR ||
	     displayid_primary_use(&iter) == PRIMARY_USE_HEAD_MOUNTED_AR))
```

These are minor but inconsistent with both the original code and typical kernel style.

**No functional concerns.**

---

---
Generated by Claude Code Patch Reviewer

  parent reply	other threads:[~2026-05-25 12:19 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  2:13 [PATCH v2 0/3] drm: detect panel type from DisplayID 2.x Chenyu Chen
2026-05-20  2:13 ` [PATCH v2 1/3] drm/edid: extract section header processing into helper Chenyu Chen
2026-05-20 13:10   ` Jani Nikula
2026-05-25 12:19   ` Claude Code Review Bot [this message]
2026-05-20  2:13 ` [PATCH v2 2/3] drm/edid: parse panel type from DisplayID 2.x Display Parameters Chenyu Chen
2026-05-20 13:30   ` Jani Nikula
2026-05-25 12:19   ` Claude review: " Claude Code Review Bot
2026-05-20  2:13 ` [PATCH v2 3/3] drm/amd/display: use DisplayID panel type in dm_set_panel_type Chenyu Chen
2026-05-25 12:19   ` Claude review: " Claude Code Review Bot
2026-05-25 12:19 ` Claude review: drm: detect panel type from DisplayID 2.x 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-patch1-20260520021432.1301326-2-chen-yu.chen@amd.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