From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amd/display: clean up reversed type specifiers in dml2_core
Date: Thu, 30 Apr 2026 10:53:42 +1000 [thread overview]
Message-ID: <review-patch1-20260429210209.42737-1-adri.vero.dev@gmail.com> (raw)
In-Reply-To: <20260429210209.42737-1-adri.vero.dev@gmail.com>
Patch Review
**Changes in `dml2_core_dcn4.c`:**
The two viewport height casts are fixed:
```c
- phantom->composition.viewport.plane0.height = (long int unsigned) math_min2(...)
+ phantom->composition.viewport.plane0.height = (unsigned long) math_min2(...)
```
And the local variable declaration:
```c
- int unsigned odm_count, num_odm_output_segments, dpp_count;
+ unsigned int odm_count, num_odm_output_segments, dpp_count;
```
Both correct. The `height` field is `unsigned long` per `dml_top_display_cfg_types.h:223`, so the cast target type matches.
**Changes in `dml2_core_utils.c`:**
Return type and local variable fix:
```c
-int unsigned dml2_core_utils_get_gfx_version(enum dml2_swizzle_mode sw_mode)
+unsigned int dml2_core_utils_get_gfx_version(enum dml2_swizzle_mode sw_mode)
{
- int unsigned version = 0;
+ unsigned int version = 0;
```
Correct.
Parameter type fix with line-length reformatting:
```c
-unsigned int dml2_core_util_get_num_active_pipes(int unsigned num_planes, const struct core_display_cfg_support_info *cfg_support_info)
+unsigned int
+dml2_core_util_get_num_active_pipes(unsigned int num_planes,
+ const struct core_display_cfg_support_info *cfg_support_info)
```
Correct, and the reformatting is welcome since the old line was well over 80 columns.
Same viewport height cast fixes as in `dml2_core_dcn4.c` — this is a duplicate `create_phantom_plane_from_main_plane` function (one static copy per file). Both fixed consistently.
**Changes in `dml2_core_utils.h`:**
Declarations updated to match the `.c` changes for both `dml2_core_util_get_num_active_pipes` and `dml2_core_utils_get_gfx_version`. Consistent with the source.
**Minor observation:** The two separate static copies of `create_phantom_plane_from_main_plane` in `dml2_core_dcn4.c` and `dml2_core_utils.c` are a pre-existing code duplication issue, not introduced by this patch.
**Reviewed-by worthy:** Yes. No issues.
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-30 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-29 21:02 [PATCH] drm/amd/display: clean up reversed type specifiers in dml2_core Adriano Vero
2026-04-30 0:53 ` Claude Code Review Bot [this message]
2026-04-30 0:53 ` 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-patch1-20260429210209.42737-1-adri.vero.dev@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