Subject: Re: [PATCH net-next v7 4/4] net: phy: realtek: add RTL8224 polarity support

From: Jakub Kicinski <[email-masked]>
Date: Thu, 12 Mar 2026 18:11:46 -0700

On Tue, 10 Mar 2026 18:38:46 +0100 Damien Dejean wrote:
> +static int rtl8224_package_modify_mmd(struct phy_device *phydev, int devad,
> +				      u32 regnum, u16 mask, u16 set)
> +{
> +	int val, ret;
> +
> +	phy_lock_mdio_bus(phydev);
> +
> +	val = __phy_package_read_mmd(phydev, 0, devad, regnum);
> +	if (val < 0) {
> +		ret = val;
> +		goto exit;
> +	}
> +
> +	val &= ~mask;
> +	val |= set;
> +
> +	ret = __phy_package_write_mmd(phydev, 0, devad, regnum, val);
> +
> +exit:
> +	phy_unlock_mdio_bus(phydev);
> +	return ret;
> +}

Can this helper be added in patch 2 so that we don't rewrite the code
we just added? It makes the diff harder to follow.
-- 
pw-bot: cr