Re: [net-next,v3,1/2] net: phy: realtek: Clean up RTL8211E ExtPage access

Russell King (Oracle)
2025-03-17T11:13:13Z

On Sun, Mar 16, 2025 at 01:14:22PM +0100, Michael Klein wrote:
> +static int rtl8211e_modify_ext_page(struct phy_device *phydev, u16 ext_page,
> + u32 regnum, u16 mask, u16 set)
> +{
> + int oldpage, ret = 0;
> +
> + oldpage = phy_select_page(phydev, RTL8211E_SET_EXT_PAGE);
> + if (oldpage >= 0) {
> + ret = __phy_write(phydev, RTL8211E_EXT_PAGE_SELECT, ext_page);
> + if (!ret)

Only a nit, but !ret "reads" weirdly when you consider what the code is
doing, "ret == 0" seems more natural. It's only a nit so feel free to
ignore.

Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Thanks!

--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!