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: platform: remove software node on release() Date: Sat, 16 May 2026 11:52:19 +1000 Message-ID: In-Reply-To: <20260513-swnode-remove-on-dev-unreg-v6-1-f9c58939df27@oss.qualcomm.com> References: <20260513-swnode-remove-on-dev-unreg-v6-0-f9c58939df27@oss.qualcomm.com> <20260513-swnode-remove-on-dev-unreg-v6-1-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 Patch Review **Correct and well-contained fix.** This adds a `platform_device_release_full()` wrapper that calls `device_remove_software_node()` before the standard release, and uses it only when a swnode is explicitly added via `pdevinfo->swnode`. The expanded validation of mutually-exclusive software node sources is good: ```c if ((pdevinfo->swnode && pdevinfo->properties) || (pdevinfo->swnode && is_software_node(pdevinfo->fwnode)) || (pdevinfo->properties && is_software_node(pdevinfo->fwnode))) return ERR_PTR(-EINVAL); ``` This correctly catches all three ways two software nodes could collide. The release callback override placement is correct -- it's set after `device_add_software_node()` succeeds, so only devices with a secondary swnode get the new release callback: ```c pdev->dev.release = platform_device_release_full; ``` **Minor nit**: commit message has "additonally" (should be "additionally"). **Verdict**: Looks correct as a standalone v7.1 fix. --- --- Generated by Claude Code Patch Reviewer