All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: weifeng.voon@intel.com
Cc: mcoquelin.stm32@gmail.com, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, joabreu@synopsys.com,
	peppe.cavallaro@st.com, andrew@lunn.ch, f.fainelli@gmail.com,
	alexandre.torgue@st.com, biao.huang@mediatek.com,
	boon.leong.ong@intel.com, hock.leong.kweh@intel.com
Subject: Re: [PATCH net-next v5 2/5] net: stmmac: introducing support for DWC xPCS logics
Date: Mon, 03 Jun 2019 14:53:19 -0700 (PDT)	[thread overview]
Message-ID: <20190603.145319.259092628945656490.davem@davemloft.net> (raw)
In-Reply-To: <1559332694-6354-3-git-send-email-weifeng.voon@intel.com>

From: Voon Weifeng <weifeng.voon@intel.com>
Date: Sat,  1 Jun 2019 03:58:11 +0800

> +static void dw_xpcs_init(struct net_device *ndev, int pcs_mode)
> +{
> +	struct stmmac_priv *priv = netdev_priv(ndev);
> +	int xpcs_phy_addr = priv->plat->xpcs_phy_addr;
> +	int phydata;

Reverse christmas tree please.  Put the assignments onto separate
lines if necessary.

> +static void dw_xpcs_ctrl_ane(struct net_device *ndev, bool ane,
> +			     bool loopback)
> +{
> +	struct stmmac_priv *priv = netdev_priv(ndev);
> +	int xpcs_phy_addr = priv->plat->xpcs_phy_addr;
> +
> +	int phydata = xpcs_read(XPCS_MDIO_MII_MMD, MII_BMCR);

Please don't break up the local variable declarations like this, and
also reverse christmas tree.

> +static void dw_xpcs_get_adv_lp(struct net_device *ndev,
> +			       struct rgmii_adv *adv_lp,
> +			       int pcs_mode)
> +{
> +	struct stmmac_priv *priv = netdev_priv(ndev);
> +	int xpcs_phy_addr = priv->plat->xpcs_phy_addr;
> +
> +	/* AN Advertisement Ability */
> +	int value = xpcs_read(XPCS_MDIO_MII_MMD, MII_ADVERTISE);

Likewise.

> +static int dw_xpcs_irq_status(struct net_device *ndev,
> +			      struct stmmac_extra_stats *x,
> +			      int pcs_mode)
> +{
> +	struct stmmac_priv *priv = netdev_priv(ndev);
> +	int xpcs_phy_addr = priv->plat->xpcs_phy_addr;
> +	int ret = IRQ_NONE;
> +
> +	/* AN status */
> +	int an_stat = xpcs_read(XPCS_MDIO_MII_MMD, MDIO_MII_MMD_AN_STAT);

Likewise.

  reply	other threads:[~2019-06-03 21:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-31 19:58 [PATCH net-next v5 0/5] net: stmmac: enable EHL SGMI Voon Weifeng
2019-05-31 19:58 ` [PATCH net-next v5 1/5] net: stmmac: enable clause 45 mdio support Voon Weifeng
2019-05-31 12:39   ` Andrew Lunn
2019-05-31 19:58 ` [PATCH net-next v5 2/5] net: stmmac: introducing support for DWC xPCS logics Voon Weifeng
2019-06-03 21:53   ` David Miller [this message]
2019-05-31 19:58 ` [PATCH net-next v5 3/5] net: stmmac: add xpcs function hooks into main driver and ethtool Voon Weifeng
2019-06-03 21:54   ` David Miller
2019-05-31 19:58 ` [PATCH net-next v5 4/5] net: stmmac: add xPCS functions for device with DWMACv5.1 Voon Weifeng
2019-05-31 19:58 ` [PATCH net-next v5 5/5] net: stmmac: add EHL SGMII 1Gbps PCI info and PCI ID Voon Weifeng
2019-06-03 11:54 ` [PATCH net-next v5 0/5] net: stmmac: enable EHL SGMI Jose Abreu
2019-06-04 10:44   ` Voon, Weifeng

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=20190603.145319.259092628945656490.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=alexandre.torgue@st.com \
    --cc=andrew@lunn.ch \
    --cc=biao.huang@mediatek.com \
    --cc=boon.leong.ong@intel.com \
    --cc=f.fainelli@gmail.com \
    --cc=hock.leong.kweh@intel.com \
    --cc=joabreu@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=peppe.cavallaro@st.com \
    --cc=weifeng.voon@intel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.