Netdev List
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Antoine Tenart <antoine.tenart@bootlin.com>
Cc: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
	hkallweit1@gmail.com, richardcochran@gmail.com,
	alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	thomas.petazzoni@bootlin.com, allan.nielsen@microchip.com,
	foss@0leil.net
Subject: Re: [PATCH net-next v2 5/8] net: phy: mscc: 1588 block initialization
Date: Wed, 17 Jun 2020 09:32:58 -0700	[thread overview]
Message-ID: <20200617093258.52614fd8@kicinski-fedora-PC1C0HJN> (raw)
In-Reply-To: <20200617133127.628454-6-antoine.tenart@bootlin.com>

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);
> +}

  reply	other threads:[~2020-06-17 16:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-17 13:31 [PATCH net-next v2 0/8] net: phy: mscc: PHC and timestamping support Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 1/8] net: phy: add support for a common probe between shared PHYs Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 2/8] net: phy: mscc: fix copyright and author information in MACsec Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 3/8] net: phy: mscc: remove the TR CLK disable magic value Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 4/8] net: phy: mscc: take into account the 1588 block in MACsec init Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 5/8] net: phy: mscc: 1588 block initialization Antoine Tenart
2020-06-17 16:32   ` Jakub Kicinski [this message]
2020-06-18  7:18     ` Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 6/8] net: phy: mscc: timestamping and PHC support Antoine Tenart
2020-06-17 16:32   ` Jakub Kicinski
2020-06-18  7:19     ` Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 7/8] dt-bindings: net: phy: vsc8531: document the load/save GPIO Antoine Tenart
2020-06-17 13:31 ` [PATCH net-next v2 8/8] MIPS: dts: ocelot: describe " Antoine Tenart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200617093258.52614fd8@kicinski-fedora-PC1C0HJN \
    --to=kuba@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=allan.nielsen@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=antoine.tenart@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=foss@0leil.net \
    --cc=hkallweit1@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox