[PATCH net-next v7 3/5] net: phy: mediatek: Add token ring access helper functions in mtk-phy-lib

Russell King (Oracle) linux at armlinux.org.uk
Wed Jun 19 02:01:27 PDT 2024


On Thu, Jun 13, 2024 at 06:40:21PM +0800, Sky Huang wrote:
> +/* Difference between functions with tr* and __tr* prefixes is
> + *   tr* functions: wrapped by page switching operations
> + * __tr* functions: no page switching operations

Please don't align "tr" like this  the lack of __ doesn't stand out with
this formatting.

> +void __tr_modify(struct phy_device *phydev, u8 ch_addr, u8 node_addr,
> +		 u8 data_addr, u32 mask, u32 set)
> +{
> +	u32 tr_data;
> +	u16 tr_high;
> +	u16 tr_low;
> +
> +	__tr_read(phydev, ch_addr, node_addr, data_addr, &tr_high, &tr_low);
> +	tr_data = (tr_high << 16) | tr_low;
> +	tr_data = (tr_data & ~mask) | set;
> +	__tr_write(phydev, ch_addr, node_addr, data_addr, tr_data);
> +}
> +EXPORT_SYMBOL_GPL(__tr_modify);

These __tr_* symbols will be visible to the entire kernel, so they
should be more specific to ensure that they won't clash in the future.
Maybe __mtk_tr_* ?

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



More information about the Linux-mediatek mailing list