From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: platform/x86/intel/vsec: Return real error codes from registration path Date: Fri, 27 Feb 2026 14:12:37 +1000 Message-ID: In-Reply-To: <20260224-upstream-pmt-acpi-v5-v5-5-8dd73bcf049c@linux.intel.com> References: <20260224-upstream-pmt-acpi-v5-v5-0-8dd73bcf049c@linux.intel.com> <20260224-upstream-pmt-acpi-v5-v5-5-8dd73bcf049c@linux.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 **Overall: Good intent but introduces a semantic change in error behavior.** The patch converts `intel_vsec_walk_header()` from returning `bool` (any device registered successfully) to `int` (first error encountered). This is a meaningful behavioral change: ```c for ( ; *header; header++) { ret = intel_vsec_register_device(dev, *header, info, info->base_addr); - if (!ret) - have_devices = true; + if (ret) + return ret; } -return have_devices; +return 0; ``` **The old behavior**: iterate all headers, register as many devices as possible, return success if *any* device was registered. Individual failures were silently ignored. **The new behavior**: return the *first* error encountered and *stop processing remaining headers*. This is a significant semantic change that the commit message describes as "preserves success behavior" but it doesn't fully: - If the first header fails but the second would succeed, the old code would register the second device and return success. The new code fails immediately. - For cases where `intel_vsec_register_device()` returns `-EAGAIN` (deferred dependency), the old code would continue and register other devices. The new code aborts. Consider whether this short-circuit on first error is intentional. If only partial registration is acceptable, the old approach of continuing was more robust. If the intent is truly "all-or-nothing", the already-registered devices from earlier iterations should be cleaned up (which isn't done here). **Suggestion**: Either restore the iterate-all-and-track-first-error approach (return first error only if *no* devices succeeded), or document that all-or-nothing semantics is the new intended behavior. The `-EAGAIN` case seems particularly problematic with the new short-circuit. --- --- Generated by Claude Code Patch Reviewer