[PATCH net-next v7 3/5] net: phy: mediatek: Add token ring access helper functions in mtk-phy-lib
SkyLake Huang (黃啟澤)
SkyLake.Huang at mediatek.com
Wed Jun 19 04:33:38 PDT 2024
On Wed, 2024-06-19 at 10:01 +0100, Russell King (Oracle) wrote:
>
> External email : Please do not click links or open attachments until
> you have verified the sender or the content.
> 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!
Agree. I'll fix the above and replace tr*/__tr* with mtk_tr*/__mtk_tr*.
BRs,
Sky
More information about the Linux-mediatek
mailing list