From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: driver core: remove software node from platform devices on device release Date: Sat, 16 May 2026 11:52:19 +1000 Message-ID: In-Reply-To: <20260513-swnode-remove-on-dev-unreg-v6-0-f9c58939df27@oss.qualcomm.com> References: <20260513-swnode-remove-on-dev-unreg-v6-0-f9c58939df27@oss.qualcomm.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Overall Series Review Subject: driver core: remove software node from platform devices on device release Author: Bartosz Golaszewski Patches: 8 Reviewed: 2026-05-16T11:52:19.024941 --- This is a well-structured 6-patch series from Bartosz Golaszewski that fixes a real software node lifecycle bug in the platform device subsystem. When a software node is specified via `struct platform_device_info`, it leaks on device release (and subsequent re-registration fails with `-EBUSY`). The approach is sound: patch 1 provides a minimal targeted fix for v7.1, patches 2-3 convert drivers that would regress under a unified release path, patch 4 unifies the release path, and patches 5-6 add kunit test infrastructure and test coverage. The overall design is correct and the refcount logic in patch 4 is carefully thought through. However, **patch 2 has a significant bug**: the `surface_gpe_exit()` function is not updated, leaving a `fwnode_remove_software_node()` call that will operate on a managed software node that has already been freed during `platform_device_unregister()` -- a use-after-free. **DRM-relevant patches**: Patch 3 (xe_i2c) is clean and correct. Ack recommended. --- --- Generated by Claude Code Patch Reviewer