[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200617093258.52614fd8@kicinski-fedora-PC1C0HJN>
Date: Wed, 17 Jun 2020 09:32:58 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Antoine Tenart <antoine.tenart@...tlin.com>
Cc: davem@...emloft.net, andrew@...n.ch, f.fainelli@...il.com,
hkallweit1@...il.com, richardcochran@...il.com,
alexandre.belloni@...tlin.com, UNGLinuxDriver@...rochip.com,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
thomas.petazzoni@...tlin.com, allan.nielsen@...rochip.com,
foss@...il.net
Subject: Re: [PATCH net-next v2 5/8] net: phy: mscc: 1588 block
initialization
On Wed, 17 Jun 2020 15:31:24 +0200 Antoine Tenart wrote:
> +/* Two PHYs share the same 1588 processor and it's to be entirely configured
> + * through the base PHY of this processor.
> + */
> +/* phydev->bus->mdio_lock should be locked when using this function */
> +static inline int phy_ts_base_write(struct phy_device *phydev, u32 regnum,
> + u16 val)
Please don't use static inline outside of headers in networking code.
The compiler will know best what to inline and when.
> +{
> + struct vsc8531_private *priv = phydev->priv;
> +
> + WARN_ON_ONCE(!mutex_is_locked(&phydev->mdio.bus->mdio_lock));
> + return __mdiobus_write(phydev->mdio.bus, priv->ts_base_addr, regnum,
> + val);
> +}
> +
> +/* phydev->bus->mdio_lock should be locked when using this function */
> +static inline int phy_ts_base_read(struct phy_device *phydev, u32 regnum)
> +{
> + struct vsc8531_private *priv = phydev->priv;
> +
> + WARN_ON_ONCE(!mutex_is_locked(&phydev->mdio.bus->mdio_lock));
> + return __mdiobus_read(phydev->mdio.bus, priv->ts_base_addr, regnum);
> +}
Powered by blists - more mailing lists