From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/amdgpu/jpeg: deduplicate jpeg_v3_0 process_interrupt
Date: Thu, 23 Apr 2026 07:56:59 +1000 [thread overview]
Message-ID: <review-patch1-20260422003911.33841-2-tiagodourado@usp.br> (raw)
In-Reply-To: <20260422003911.33841-2-tiagodourado@usp.br>
Patch Review
**Correctness:** The deleted `jpeg_v3_0_process_interrupt` is verified identical to `jpeg_v2_0_process_interrupt` — both use `VCN_2_0__SRCID__JPEG_DECODE`, `DRM_ERROR`, and `adev->jpeg.inst->ring_dec`. The deduplication is valid.
**Style concern — macro alias is unnecessary indirection:**
```c
#define jpeg_v3_0_process_interrupt jpeg_v2_0_process_interrupt
```
This macro exists solely so the struct initializer can still say `.process = jpeg_v3_0_process_interrupt`. This is over-engineering — it hides the actual function being called and makes code search harder (grepping for the definition of `jpeg_v3_0_process_interrupt` now lands on a macro, not a function). It would be simpler and more readable to just use the function directly in the struct initializer:
```c
static const struct amdgpu_irq_src_funcs jpeg_v3_0_irq_funcs = {
.set = jpeg_v3_0_set_interrupt_state,
.process = jpeg_v2_0_process_interrupt,
};
```
This is the standard kernel pattern for reusing a function from another version — no macro needed.
**Tag ordering issue:** The Signed-off-by / Co-developed-by order is wrong per `Documentation/process/submitting-patches.rst`. Currently:
```
Signed-off-by: Tiago Dourado <tiagodourado@usp.br>
Co-developed-by: Luiz Fernandes <luiz.f.f.fernandes@usp.br>
Signed-off-by: Luiz Fernandes <luiz.f.f.fernandes@usp.br>
```
The submitter's `Signed-off-by` must be **last**, and every `Co-developed-by` must be immediately followed by its matching `Signed-off-by`. The correct order is:
```
Co-developed-by: Luiz Fernandes <luiz.f.f.fernandes@usp.br>
Signed-off-by: Luiz Fernandes <luiz.f.f.fernandes@usp.br>
Signed-off-by: Tiago Dourado <tiagodourado@usp.br>
```
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-04-22 21:56 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-22 0:38 [PATCH 0/2] drm/amdgpu/jpeg: deduplicate process_interrupt across JPEG versions Tiago Dourado
2026-04-22 0:38 ` [PATCH 1/2] drm/amdgpu/jpeg: deduplicate jpeg_v3_0 process_interrupt Tiago Dourado
2026-04-22 21:56 ` Claude Code Review Bot [this message]
2026-04-22 0:38 ` [PATCH 2/2] drm/amdgpu/jpeg: deduplicate jpeg_v5_3_0 process_interrupt Tiago Dourado
2026-04-22 21:56 ` Claude review: " Claude Code Review Bot
2026-04-22 21:56 ` Claude review: drm/amdgpu/jpeg: deduplicate process_interrupt across JPEG versions 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-20260422003911.33841-2-tiagodourado@usp.br \
--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