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/amdgpu: deduplicate JPEG v5.0 interrupt routine
Date: Thu, 23 Apr 2026 07:54:54 +1000	[thread overview]
Message-ID: <review-patch1-20260421200236.30927-1-andrebueno.mac@gmail.com> (raw)
In-Reply-To: <20260421200236.30927-1-andrebueno.mac@gmail.com>

Patch Review

**Co-developed-by / Signed-off-by ordering is wrong.** The patch has:

```
Signed-off-by: Andre Luiz Batista Bueno <andrebueno.mac@gmail.com>
Co-developed-by: Enzo Furegatti Spinella <enzo.spinella@usp.br>
Signed-off-by: Enzo Furegatti Spinella <enzo.spinella@usp.br>
```

Per `Documentation/process/submitting-patches.rst`, "the last Signed-off-by: must always be that of the developer submitting the patch." Since Andre is the `From:` author and submitter, it should be:

```
Co-developed-by: Enzo Furegatti Spinella <enzo.spinella@usp.br>
Signed-off-by: Enzo Furegatti Spinella <enzo.spinella@usp.br>
Signed-off-by: Andre Luiz Batista Bueno <andrebueno.mac@gmail.com>
```

**Code review — the extraction is correct.** The new `jpeg_v5_0_process_interrupt_common()` in `jpeg_v5_0_interrupt.c` is an exact copy of the duplicated logic. Both callers in `jpeg_v5_0_1.c` and `jpeg_v5_0_2.c` are converted to thin wrappers that correctly drop the unused `source` parameter:

```c
static int jpeg_v5_0_1_process_interrupt(struct amdgpu_device *adev,
					 struct amdgpu_irq_src *source,
					 struct amdgpu_iv_entry *entry)
{
	return jpeg_v5_0_process_interrupt_common(adev, entry);
}
```

This preserves the `.process` callback signature while the common function only takes what it actually uses. Fine.

**Header is well-structured.** The include guard, forward declarations, and prototype are all correct:

```c
struct amdgpu_device;
struct amdgpu_iv_entry;

int jpeg_v5_0_process_interrupt_common(struct amdgpu_device *adev,
				       struct amdgpu_iv_entry *entry);
```

**Naming observation.** The file is named `jpeg_v5_0_interrupt` which could imply it covers all v5.0.x variants, but `jpeg_v5_0_0.c` and `jpeg_v5_3_0.c` have substantially different interrupt handlers — they are single-instance, don't use `node_id_to_phys_map`, and only handle `VCN_5_0__SRCID__JPEG_DECODE` (one ring, not ten). So this common function is only applicable to the multi-instance variants (v5_0_1 and v5_0_2). The name isn't wrong, but something like `jpeg_v5_0_multi_interrupt` or placing the function in an existing common file might be clearer. This is a minor nit.

**Missed opportunity.** The 10-case switch mapping sequential `JPEG[N]_DECODE` source IDs to `ring_dec[N]` could potentially be replaced with arithmetic if the SRCID values are sequential, but that's a separate improvement and would change behavior during a refactoring patch, so keeping the switch as-is is the correct choice here.

**Makefile change is correct.** The new object file is added in alphabetical order in the right section.

**Verdict:** The code change is correct. The `Co-developed-by` / `Signed-off-by` tag ordering needs to be fixed before merging.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-04-22 21:54 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-21 20:02 [PATCH] drm/amdgpu: deduplicate JPEG v5.0 interrupt routine Andre Luiz Batista Bueno
2026-04-22 21:54 ` Claude review: " Claude Code Review Bot
2026-04-22 21:54 ` Claude Code Review Bot [this message]

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-20260421200236.30927-1-andrebueno.mac@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