[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YMOBh/lpHCSMsTPt@lunn.ch>
Date: Fri, 11 Jun 2021 17:30:15 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Weihang Li <liweihang@...wei.com>
Cc: davem@...emloft.net, kuba@...nel.org, hkallweit1@...il.com,
netdev@...r.kernel.org, linuxarm@...wei.com,
Wenpeng Liang <liangwenpeng@...wei.com>
Subject: Re: [PATCH net-next 5/8] net: phy: fixed space alignment issues
> (MII_DM9161_INTR_DPLX_MASK | MII_DM9161_INTR_SPD_MASK \
> - | MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK)
> + | MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK)
The convention is to put the | at the end of the line. So
(MII_DM9161_INTR_DPLX_MASK | MII_DM9161_INTR_SPD_MASK | \
MII_DM9161_INTR_LINK_MASK | MII_DM9161_INTR_MASK)
> #define MII_DM9161_INTR_CHANGE \
> (MII_DM9161_INTR_DPLX_CHANGE | \
> MII_DM9161_INTR_SPD_CHANGE | \
> diff --git a/drivers/net/phy/phy-core.c b/drivers/net/phy/phy-core.c
> index 2870c33..c8d8ef8 100644
> --- a/drivers/net/phy/phy-core.c
> +++ b/drivers/net/phy/phy-core.c
> @@ -84,98 +84,98 @@ EXPORT_SYMBOL_GPL(phy_duplex_to_str);
>
> static const struct phy_setting settings[] = {
> /* 400G */
> - PHY_SETTING( 400000, FULL, 400000baseCR8_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseKR8_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseLR8_ER8_FR8_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseDR8_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseSR8_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseCR4_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseKR4_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseLR4_ER4_FR4_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseDR4_Full ),
> - PHY_SETTING( 400000, FULL, 400000baseSR4_Full ),
> + PHY_SETTING(400000, FULL, 400000baseCR8_Full),
> + PHY_SETTING(400000, FULL, 400000baseKR8_Full),
> + PHY_SETTING(400000, FULL, 400000baseLR8_ER8_FR8_Full),
> + PHY_SETTING(400000, FULL, 400000baseDR8_Full),
> + PHY_SETTING(400000, FULL, 400000baseSR8_Full),
> + PHY_SETTING(400000, FULL, 400000baseCR4_Full),
> + PHY_SETTING(400000, FULL, 400000baseKR4_Full),
> + PHY_SETTING(400000, FULL, 400000baseLR4_ER4_FR4_Full),
> + PHY_SETTING(400000, FULL, 400000baseDR4_Full),
> + PHY_SETTING(400000, FULL, 400000baseSR4_Full),
> /* 200G */
> - PHY_SETTING( 200000, FULL, 200000baseCR4_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseKR4_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseLR4_ER4_FR4_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseDR4_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseSR4_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseCR2_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseKR2_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseLR2_ER2_FR2_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseDR2_Full ),
> - PHY_SETTING( 200000, FULL, 200000baseSR2_Full ),
> + PHY_SETTING(200000, FULL, 200000baseCR4_Full),
> + PHY_SETTING(200000, FULL, 200000baseKR4_Full),
> + PHY_SETTING(200000, FULL, 200000baseLR4_ER4_FR4_Full),
> + PHY_SETTING(200000, FULL, 200000baseDR4_Full),
> + PHY_SETTING(200000, FULL, 200000baseSR4_Full),
> + PHY_SETTING(200000, FULL, 200000baseCR2_Full),
> + PHY_SETTING(200000, FULL, 200000baseKR2_Full),
> + PHY_SETTING(200000, FULL, 200000baseLR2_ER2_FR2_Full),
> + PHY_SETTING(200000, FULL, 200000baseDR2_Full),
> + PHY_SETTING(200000, FULL, 200000baseSR2_Full),
> /* 100G */
> - PHY_SETTING( 100000, FULL, 100000baseCR4_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseKR4_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseLR4_ER4_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseSR4_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseCR2_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseKR2_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseLR2_ER2_FR2_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseDR2_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseSR2_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseCR_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseKR_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseLR_ER_FR_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseDR_Full ),
> - PHY_SETTING( 100000, FULL, 100000baseSR_Full ),
> + PHY_SETTING(100000, FULL, 100000baseCR4_Full),
> + PHY_SETTING(100000, FULL, 100000baseKR4_Full),
> + PHY_SETTING(100000, FULL, 100000baseLR4_ER4_Full),
> + PHY_SETTING(100000, FULL, 100000baseSR4_Full),
> + PHY_SETTING(100000, FULL, 100000baseCR2_Full),
> + PHY_SETTING(100000, FULL, 100000baseKR2_Full),
> + PHY_SETTING(100000, FULL, 100000baseLR2_ER2_FR2_Full),
> + PHY_SETTING(100000, FULL, 100000baseDR2_Full),
> + PHY_SETTING(100000, FULL, 100000baseSR2_Full),
> + PHY_SETTING(100000, FULL, 100000baseCR_Full),
> + PHY_SETTING(100000, FULL, 100000baseKR_Full),
> + PHY_SETTING(100000, FULL, 100000baseLR_ER_FR_Full),
> + PHY_SETTING(100000, FULL, 100000baseDR_Full),
> + PHY_SETTING(100000, FULL, 100000baseSR_Full),
> /* 56G */
> - PHY_SETTING( 56000, FULL, 56000baseCR4_Full ),
> - PHY_SETTING( 56000, FULL, 56000baseKR4_Full ),
> - PHY_SETTING( 56000, FULL, 56000baseLR4_Full ),
> - PHY_SETTING( 56000, FULL, 56000baseSR4_Full ),
> + PHY_SETTING(56000, FULL, 56000baseCR4_Full),
> + PHY_SETTING(56000, FULL, 56000baseKR4_Full),
> + PHY_SETTING(56000, FULL, 56000baseLR4_Full),
> + PHY_SETTING(56000, FULL, 56000baseSR4_Full),
> /* 50G */
> - PHY_SETTING( 50000, FULL, 50000baseCR2_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseKR2_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseSR2_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseCR_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseKR_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseLR_ER_FR_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseDR_Full ),
> - PHY_SETTING( 50000, FULL, 50000baseSR_Full ),
> + PHY_SETTING(50000, FULL, 50000baseCR2_Full),
> + PHY_SETTING(50000, FULL, 50000baseKR2_Full),
> + PHY_SETTING(50000, FULL, 50000baseSR2_Full),
> + PHY_SETTING(50000, FULL, 50000baseCR_Full),
> + PHY_SETTING(50000, FULL, 50000baseKR_Full),
> + PHY_SETTING(50000, FULL, 50000baseLR_ER_FR_Full),
> + PHY_SETTING(50000, FULL, 50000baseDR_Full),
> + PHY_SETTING(50000, FULL, 50000baseSR_Full),
> /* 40G */
> - PHY_SETTING( 40000, FULL, 40000baseCR4_Full ),
> - PHY_SETTING( 40000, FULL, 40000baseKR4_Full ),
> - PHY_SETTING( 40000, FULL, 40000baseLR4_Full ),
> - PHY_SETTING( 40000, FULL, 40000baseSR4_Full ),
> + PHY_SETTING(40000, FULL, 40000baseCR4_Full),
> + PHY_SETTING(40000, FULL, 40000baseKR4_Full),
> + PHY_SETTING(40000, FULL, 40000baseLR4_Full),
> + PHY_SETTING(40000, FULL, 40000baseSR4_Full),
> /* 25G */
> - PHY_SETTING( 25000, FULL, 25000baseCR_Full ),
> - PHY_SETTING( 25000, FULL, 25000baseKR_Full ),
> - PHY_SETTING( 25000, FULL, 25000baseSR_Full ),
> + PHY_SETTING(25000, FULL, 25000baseCR_Full),
> + PHY_SETTING(25000, FULL, 25000baseKR_Full),
> + PHY_SETTING(25000, FULL, 25000baseSR_Full),
> /* 20G */
> - PHY_SETTING( 20000, FULL, 20000baseKR2_Full ),
> - PHY_SETTING( 20000, FULL, 20000baseMLD2_Full ),
> + PHY_SETTING(20000, FULL, 20000baseKR2_Full),
> + PHY_SETTING(20000, FULL, 20000baseMLD2_Full),
> /* 10G */
> - PHY_SETTING( 10000, FULL, 10000baseCR_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseER_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseKR_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseKX4_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseLR_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseLRM_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseR_FEC ),
> - PHY_SETTING( 10000, FULL, 10000baseSR_Full ),
> - PHY_SETTING( 10000, FULL, 10000baseT_Full ),
> + PHY_SETTING(10000, FULL, 10000baseCR_Full),
> + PHY_SETTING(10000, FULL, 10000baseER_Full),
> + PHY_SETTING(10000, FULL, 10000baseKR_Full),
> + PHY_SETTING(10000, FULL, 10000baseKX4_Full),
> + PHY_SETTING(10000, FULL, 10000baseLR_Full),
> + PHY_SETTING(10000, FULL, 10000baseLRM_Full),
> + PHY_SETTING(10000, FULL, 10000baseR_FEC),
> + PHY_SETTING(10000, FULL, 10000baseSR_Full),
> + PHY_SETTING(10000, FULL, 10000baseT_Full),
> /* 5G */
> - PHY_SETTING( 5000, FULL, 5000baseT_Full ),
> + PHY_SETTING(5000, FULL, 5000baseT_Full),
> /* 2.5G */
> - PHY_SETTING( 2500, FULL, 2500baseT_Full ),
> - PHY_SETTING( 2500, FULL, 2500baseX_Full ),
> + PHY_SETTING(2500, FULL, 2500baseT_Full),
> + PHY_SETTING(2500, FULL, 2500baseX_Full),
> /* 1G */
> - PHY_SETTING( 1000, FULL, 1000baseKX_Full ),
> - PHY_SETTING( 1000, FULL, 1000baseT_Full ),
> - PHY_SETTING( 1000, HALF, 1000baseT_Half ),
> - PHY_SETTING( 1000, FULL, 1000baseT1_Full ),
> - PHY_SETTING( 1000, FULL, 1000baseX_Full ),
> + PHY_SETTING(1000, FULL, 1000baseKX_Full),
> + PHY_SETTING(1000, FULL, 1000baseT_Full),
> + PHY_SETTING(1000, HALF, 1000baseT_Half),
> + PHY_SETTING(1000, FULL, 1000baseT1_Full),
> + PHY_SETTING(1000, FULL, 1000baseX_Full),
> /* 100M */
> - PHY_SETTING( 100, FULL, 100baseT_Full ),
> - PHY_SETTING( 100, FULL, 100baseT1_Full ),
> - PHY_SETTING( 100, HALF, 100baseT_Half ),
> - PHY_SETTING( 100, HALF, 100baseFX_Half ),
> - PHY_SETTING( 100, FULL, 100baseFX_Full ),
> + PHY_SETTING(100, FULL, 100baseT_Full),
> + PHY_SETTING(100, FULL, 100baseT1_Full),
> + PHY_SETTING(100, HALF, 100baseT_Half),
> + PHY_SETTING(100, HALF, 100baseFX_Half),
> + PHY_SETTING(100, FULL, 100baseFX_Full),
> /* 10M */
> - PHY_SETTING( 10, FULL, 10baseT_Full ),
> - PHY_SETTING( 10, HALF, 10baseT_Half ),
> + PHY_SETTING(10, FULL, 10baseT_Full),
> + PHY_SETTING(10, HALF, 10baseT_Half),
Please do not change this. It is a deliberate design decision to add
these spaces here.
Andrew
Powered by blists - more mailing lists