[PATCH v12 33/36] phy: rockchip: usbdp: Rename mode to hw_mode

sashiko-bot at kernel.org sashiko-bot at kernel.org
Fri Jul 10 14:23:03 PDT 2026


Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Compilation failure due to an incomplete rename of `udphy->mode` to `udphy->hw_mode` in `rk_udphy_power_on()`.
--

--- Patch [33]: [PATCH v12 33/36] phy: rockchip: usbdp: Rename mode to hw_mode ---
commit e122bf8f901705d3a0997d20cdd65f61c58d31c9
Author: Sebastian Reichel <sebastian.reichel at collabora.com>

phy: rockchip: usbdp: Rename mode to hw_mode

This commit renames the mode field in struct rk_udphy to hw_mode. It
updates references across the driver to clarify that this represents the
hardware-supported modes.

> diff --git a/drivers/phy/rockchip/phy-rockchip-usbdp.c b/drivers/phy/rockchip/phy-rockchip-usbdp.c
> index cf173276bfc01..7bce642f1e968 100644
> --- a/drivers/phy/rockchip/phy-rockchip-usbdp.c
> +++ b/drivers/phy/rockchip/phy-rockchip-usbdp.c

[ ... ]

> @@ -1006,7 +1006,7 @@ static int rk_udphy_power_on(struct rk_udphy *udphy, u8 mode)
>  			return ret;
>  		}
>  
> -		if (!udphy->hs && udphy->mode & UDPHY_MODE_USB)
> +		if (!udphy->hs && udphy->hw_mode & UDPHY_MODE_USB)
>  			rk_udphy_u3_port_disable(udphy, false);
>  		udphy->phy_needs_reinit = false;
>  

[Severity: Low]
Does this code miss another rename of the mode field slightly further down in
rk_udphy_power_on()?

Looking at the else if (udphy->phy_needs_reinit) branch in the same function,
there is another reference to the old mode field:

		if (udphy->mode & UDPHY_MODE_USB)
			rk_udphy_u3_port_disable(udphy, false);

Will this cause a compilation failure since the mode field was removed from
struct rk_udphy?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260710-rockchip-usbdp-cleanup-v12-0-8b41a9a9bef0@collabora.com?part=33



More information about the linux-phy mailing list