From: Claude Code Review Bot <claude-review@example.com>
To: dri-devel-reviews@example.com
Subject: Claude review: drm/xe/i2c: use device_create_managed_software_node()
Date: Sat, 16 May 2026 11:52:19 +1000 [thread overview]
Message-ID: <review-patch3-20260513-swnode-remove-on-dev-unreg-v6-3-f9c58939df27@oss.qualcomm.com> (raw)
In-Reply-To: <20260513-swnode-remove-on-dev-unreg-v6-3-f9c58939df27@oss.qualcomm.com>
Patch Review
**Clean and correct.** This converts xe_i2c from manually creating a software node as the primary fwnode to using `device_create_managed_software_node()`, which ties the software node's lifecycle to the device.
Key changes:
- `fwnode_create_software_node()` + `pdev->dev.fwnode = fwnode` is replaced by `device_create_managed_software_node(&pdev->dev, ...)` called after `platform_device_alloc()` but before `platform_device_add()`.
- The explicit `fwnode_remove_software_node()` in `xe_i2c_unregister_adapter()` is correctly removed since the managed node self-cleans.
- The `adapter_node` field is correctly removed from `struct xe_i2c`.
The comment explaining why `platform_device_register_full()` isn't used (need the pdev handle before registration for `xe_i2c_notifier()`) is retained, which is good.
Semantically, `device_create_managed_software_node()` called when `dev->fwnode` is NULL will set the software node as the primary fwnode (via `set_secondary_fwnode()` logic), matching the old behavior.
The error path is also improved: on failure of `device_create_managed_software_node()`, we jump to `err_pdev_put` which calls `platform_device_put()`. The managed node will be properly cleaned up through the release path (especially after patch 4 unifies it).
**Verdict**: Ack recommended for the DRM side.
---
---
Generated by Claude Code Patch Reviewer
next prev parent reply other threads:[~2026-05-16 1:52 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-13 15:04 [PATCH v6 0/6] driver core: remove software node from platform devices on device release Bartosz Golaszewski
2026-05-13 15:04 ` [PATCH v6 1/6] driver core: platform: remove software node on release() Bartosz Golaszewski
2026-05-16 1:52 ` Claude review: " Claude Code Review Bot
2026-05-13 15:04 ` [PATCH v6 2/6] platform/surface: gpe: use platform_device_register_full() Bartosz Golaszewski
2026-05-16 1:52 ` Claude review: " Claude Code Review Bot
2026-05-13 15:04 ` [PATCH v6 3/6] drm/xe/i2c: use device_create_managed_software_node() Bartosz Golaszewski
2026-05-16 1:52 ` Claude Code Review Bot [this message]
2026-05-13 15:04 ` [PATCH v6 4/6] driver core: platform: unify release path Bartosz Golaszewski
2026-05-16 1:52 ` Claude review: " Claude Code Review Bot
2026-05-13 15:04 ` [PATCH v6 5/6] kunit: provide kunit_software_node_register() Bartosz Golaszewski
2026-05-16 1:52 ` Claude review: " Claude Code Review Bot
2026-05-13 15:04 ` [PATCH v6 6/6] driver core: platform: tests: add test cases for correct swnode removal Bartosz Golaszewski
2026-05-16 1:52 ` Claude review: " Claude Code Review Bot
2026-05-14 0:24 ` (subset) [PATCH v6 0/6] driver core: remove software node from platform devices on device release Danilo Krummrich
2026-05-16 1:52 ` 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-patch3-20260513-swnode-remove-on-dev-unreg-v6-3-f9c58939df27@oss.qualcomm.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