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: accel/amdxdna: Fix major version check on NPU1 platform
Date: Thu, 05 Mar 2026 13:17:56 +1000	[thread overview]
Message-ID: <review-patch1-20260304195012.3616908-1-lizhi.hou@amd.com> (raw)
In-Reply-To: <20260304195012.3616908-1-lizhi.hou@amd.com>

Patch Review

**The bug:** In `npu1_fw_feature_table[]`, the second entry is missing `.major = 5`:

```c
static const struct aie2_fw_feature_tbl npu1_fw_feature_table[] = {
	{ .major = 5, .min_minor = 7 },
	{ .features = BIT_U64(AIE2_NPU_COMMAND), .min_minor = 8 },  // .major defaults to 0
	{ 0 }
};
```

The iteration loop in `aie2_pci.c:67` uses `feature->major` as the loop continuation condition:
```c
for (feature = ndev->priv->fw_feature_tbl; feature->major; feature++) {
```

So the missing `.major` causes the entry to be treated as the sentinel/terminator (`{ 0 }`), meaning the `AIE2_NPU_COMMAND` feature is never detected on NPU1 platforms.

**The fix** adds `.major = 5` to match the first entry and be consistent with how `npu4_fw_feature_table` (in `npu4_regs.c:93`) correctly specifies `.major` on every entry:
```c
{ .features = BIT_U64(AIE2_NPU_COMMAND), .major = 6, .min_minor = 15 },
```

**No issues found.** The fix is a one-line data correction, straightforward and obviously correct.

Reviewed-by worthy.

---
Generated by Claude Code Patch Reviewer

      parent reply	other threads:[~2026-03-05  3:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04 19:50 [PATCH V1] accel/amdxdna: Fix major version check on NPU1 platform Lizhi Hou
2026-03-04 19:54 ` Mario Limonciello
2026-03-04 20:09   ` Lizhi Hou
2026-03-05  3:17 ` Claude review: " Claude Code Review Bot
2026-03-05  3:17 ` 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-20260304195012.3616908-1-lizhi.hou@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