From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot 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 Message-ID: In-Reply-To: <20260304074412.464435-9-riana.tauro@intel.com> References: <20260304074412.464435-7-riana.tauro@intel.com> <20260304074412.464435-9-riana.tauro@intel.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 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