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/xe/xe_drm_ras: Add support for XE DRM RAS
Date: Thu, 05 Mar 2026 13:47:40 +1000	[thread overview]
Message-ID: <review-patch2-20260304074412.464435-9-riana.tauro@intel.com> (raw)
In-Reply-To: <20260304074412.464435-9-riana.tauro@intel.com>

Patch Review

**Concern: `kasprintf` device_name not managed by drm**

```c
device_name = kasprintf(GFP_KERNEL, "%04x:%02x:%02x.%d",
                        pci_domain_nr(pdev->bus), pdev->bus->number,
                        PCI_SLOT(pdev->devfn), PCI_FUNC(pdev->devfn));
```

This uses plain `kasprintf` but nodes are allocated with `drmm_kcalloc`. Why not use `pci_name(pdev)` which returns a stable string that doesn't need to be freed? This would eliminate the `kfree(node->device_name)` in cleanup and simplify the code. `pci_name()` returns exactly the same format string.

**Concern: `register_nodes` error path doesn't unregister previously registered nodes**

```c
for_each_error_severity(i) {
    ...
    ret = drm_ras_node_register(node);
    if (ret) {
        cleanup_node_param(ras, i);
        return ret;
    }
}
```

If the second node registration fails, the first successfully registered node is never unregistered. The error path only cleans up the current iteration's parameters, not previously registered nodes.

**Minor: Name mapping macros in uAPI header**

```c
#define DRM_XE_RAS_ERROR_SEVERITY_NAMES { ... }
#define DRM_XE_RAS_ERROR_COMPONENT_NAMES { ... }
```

Placing array initializer macros in a uAPI header is unusual. These are kernel-internal lookup tables, not something userspace typically needs as C macros (userspace would use the netlink string attributes). Consider moving them to an internal header.

---
Generated by Claude Code Patch Reviewer

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

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-04  7:44 [PATCH v10 0/5] Introduce DRM_RAS using generic netlink for RAS Riana Tauro
2026-03-04  7:44 ` [PATCH v10 1/5] drm/ras: Introduce the DRM RAS infrastructure over generic netlink Riana Tauro
2026-03-05  3:47   ` Claude review: " Claude Code Review Bot
2026-03-04  7:44 ` [PATCH v10 2/5] drm/xe/xe_drm_ras: Add support for XE DRM RAS Riana Tauro
2026-03-05  3:47   ` Claude Code Review Bot [this message]
2026-03-04  7:44 ` [PATCH v10 3/5] drm/xe/xe_hw_error: Integrate DRM RAS with hardware error handling Riana Tauro
2026-03-05  3:47   ` Claude review: " Claude Code Review Bot
2026-03-04  7:44 ` [PATCH v10 4/5] drm/xe/xe_hw_error: Add support for Core-Compute errors Riana Tauro
2026-03-05  3:47   ` Claude review: " Claude Code Review Bot
2026-03-04  7:44 ` [PATCH v10 5/5] drm/xe/xe_hw_error: Add support for PVC SoC errors Riana Tauro
2026-03-05  3:47   ` Claude review: " Claude Code Review Bot
2026-03-05  3:47 ` Claude review: Introduce DRM_RAS using generic netlink for RAS Claude Code Review Bot
  -- strict thread matches above, loose matches on Subject: below --
2026-02-28  8:08 [PATCH v9 0/5] " Riana Tauro
2026-02-28  8:08 ` [PATCH v9 2/5] drm/xe/xe_drm_ras: Add support for XE DRM RAS Riana Tauro
2026-03-03  4:32   ` Claude review: " Claude Code Review Bot
2026-02-23  6:05 [PATCH v8 0/5] Introduce DRM_RAS using generic netlink for RAS Riana Tauro
2026-02-23  6:05 ` [PATCH v8 2/5] drm/xe/xe_drm_ras: Add support for XE DRM RAS Riana Tauro
2026-02-24  0:45   ` 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-patch2-20260304074412.464435-9-riana.tauro@intel.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