lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190603.145319.259092628945656490.davem@davemloft.net>
Date:   Mon, 03 Jun 2019 14:53:19 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     weifeng.voon@...el.com
Cc:     mcoquelin.stm32@...il.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, joabreu@...opsys.com,
        peppe.cavallaro@...com, andrew@...n.ch, f.fainelli@...il.com,
        alexandre.torgue@...com, biao.huang@...iatek.com,
        boon.leong.ong@...el.com, hock.leong.kweh@...el.com
Subject: Re: [PATCH net-next v5 2/5] net: stmmac: introducing support for
 DWC xPCS logics

From: Voon Weifeng <weifeng.voon@...el.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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ