From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amd/display: Deduplicate DCN DDC register assignment
Date: Wed, 01 Apr 2026 08:00:39 +1000 [thread overview]
Message-ID: <review-patch1-CAJgF-xs=3fbKQO5Mj=coPMXq0ecWmV0bJDNFN44coEHV3WS=wg@mail.gmail.com> (raw)
In-Reply-To: <CAJgF-xs=3fbKQO5Mj=coPMXq0ecWmV0bJDNFN44coEHV3WS=wg@mail.gmail.com>
Patch Review
**Positive aspects:**
- The v3 iteration correctly fixes the type mismatch from v1 (which used non-existent `struct ddc_shift` / `struct ddc_mask` instead of the actual `struct ddc_sh_mask`).
- All 6 converted call sites are identical, making this a textbook deduplication.
- Using `static inline` in a header is appropriate for this small function, avoiding cross-TU linkage issues while still deduplicating the source.
**Issues:**
1. **Missing conversion of `dcn42/hw_factory_dcn42.c`**: The `dcn42` variant has an identical `define_ddc_registers()` body (lines 184-207 in `hw_factory_dcn42.c`) that was not converted. This appears to be an oversight — dcn42 should also be updated to use the shared helper for completeness.
2. **Copyright year**: The header says `Copyright 2024` but this is a 2026 submission. Minor nit but worth correcting to `2025` or `2026`.
3. **Header self-containment**: The new header `hw_factory_dcn_ddc.h` relies on types (`struct hw_gpio_pin`, `uint32_t`, `struct ddc_registers`, `struct ddc_sh_mask`, `struct hw_ddc`, `HW_DDC_FROM_BASE`, `GPIO_ID_DDC_DATA`, `GPIO_ID_DDC_CLOCK`, `ASSERT_CRITICAL`) being defined by headers that the includer has already pulled in. This works in practice because every call site includes `hw_ddc.h` and related headers before this one, but it is fragile — if someone includes this header from a different context it will break. Consider adding a comment at the top noting the prerequisite includes, or adding the necessary `#include` directives to make the header self-contained.
4. **Coding style nit**: The blank line between `case GPIO_ID_DDC_DATA:` and `case GPIO_ID_DDC_CLOCK:` blocks is a style change from the original code (which had no blank line between cases). This is cosmetic but the original code was consistent across all 6 files, so matching the original style would be cleaner for a "no functional changes" patch.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-03-31 22:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-17 22:35 [PATCH] drm/amd/display: Deduplicate DCN DDC register assignment Guilherme Ivo Bozi
2026-03-31 1:52 ` [PATCH v3] " Guilherme Ivo Bozi
2026-03-31 22:00 ` Claude Code Review Bot [this message]
2026-03-31 22:00 ` Claude review: " Claude Code Review Bot
-- strict thread matches above, loose matches on Subject: below --
2026-03-21 1:56 [PATCH] " guilhermeivo
2026-03-21 17:15 ` Claude review: " Claude Code Review Bot
2026-03-21 17:15 ` 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-CAJgF-xs=3fbKQO5Mj=coPMXq0ecWmV0bJDNFN44coEHV3WS=wg@mail.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