From mboxrd@z Thu Jan 1 00:00:00 1970 From: Claude Code Review Bot To: dri-devel-reviews@example.com Subject: Claude review: phy: rockchip: phy-rockchip-typec: Add typec_mux/typec_switch support Date: Thu, 05 Mar 2026 13:38:00 +1000 Message-ID: In-Reply-To: <20260304094152.92-5-kernel@airkyi.com> References: <20260304094152.92-1-kernel@airkyi.com> <20260304094152.92-5-kernel@airkyi.com> X-Mailer: Claude Code Patch Reviewer Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 Patch Review This is the largest patch. Adds TCPM support alongside existing extcon. **Issue (minor): `fwnode_handle` leak in `tcphy_setup_orien_switch()`.** The `sw_desc.fwnode` is obtained via `device_get_named_child_node()` which returns a reference-counted fwnode, but it's never released: ```c sw_desc.fwnode = device_get_named_child_node(tcphy->dev, "usb3-port"); ``` Same issue in `tcphy_setup_typec_mux()`: ```c mux_desc.fwnode = device_get_named_child_node(tcphy->dev, "dp-port"); ``` These should be released with `fwnode_handle_put()` after the typec_switch/mux registration. **Observation:** The naming `udphy_orien_switch_unregister` uses "udphy" prefix instead of "tcphy" used everywhere else. Looks like a copy-paste from another driver: ```c static void udphy_orien_switch_unregister(void *data) ``` **Issue (minor): Ternary can be simplified:** ```c tcphy->flip = (orien == TYPEC_ORIENTATION_REVERSE) ? true : false; ``` Should just be: ```c tcphy->flip = orien == TYPEC_ORIENTATION_REVERSE; ``` **Observation:** The `rockchip_dp_phy_power_off()` function adds a `goto unlock` label for error handling but the label is not shown in the diff context. I'll trust it exists correctly in the full file. --- Generated by Claude Code Patch Reviewer