Re: [PATCH net-next v3 4/4] net: phy: dp83td510: Add support for the DP83TD510 Ethernet PHY

From: Jakub Kicinski
Date: Fri Oct 30 2020 - 19:03:36 EST


On Fri, 30 Oct 2020 12:29:50 -0500 Dan Murphy wrote:
> The DP83TD510E is an ultra-low power Ethernet physical layer transceiver
> that supports 10M single pair cable.
>
> The device supports both 2.4-V p2p and 1-V p2p output voltage as defined
> by IEEE 802.3cg 10Base-T1L specfications. These modes can be forced via
> the device tree or the device is defaulted to auto negotiation to
> determine the proper p2p voltage.
>
> Signed-off-by: Dan Murphy <dmurphy@xxxxxx>

drivers/net/phy/dp83td510.c:70:11: warning: symbol 'dp83td510_feature_array' was not declared. Should it be static?


Also this:

WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
#429: FILE: drivers/net/phy/dp83td510.c:371:
+ return -ENOTSUPP;

WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
#524: FILE: drivers/net/phy/dp83td510.c:466:
+ return -ENOTSUPP;

ERROR: space required before the open parenthesis '('
#580: FILE: drivers/net/phy/dp83td510.c:522:
+ if(phydev->autoneg) {

ERROR: space required before the open parenthesis '('
#588: FILE: drivers/net/phy/dp83td510.c:530:
+ if(phydev->autoneg) {


And please try to wrap the code on 80 chars on the non trivial lines:

WARNING: line length of 88 exceeds 80 columns
#458: FILE: drivers/net/phy/dp83td510.c:400:
+ mst_slave_cfg = phy_read_mmd(phydev, DP83TD510_PMD_DEVADDR, DP83TD510_PMD_CTRL);


WARNING: line length of 91 exceeds 80 columns
#505: FILE: drivers/net/phy/dp83td510.c:447:
+ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);

WARNING: line length of 93 exceeds 80 columns
#507: FILE: drivers/net/phy/dp83td510.c:449:
+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);

WARNING: line length of 91 exceeds 80 columns
#514: FILE: drivers/net/phy/dp83td510.c:456:
+ linkmode_set_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);

WARNING: line length of 93 exceeds 80 columns
#516: FILE: drivers/net/phy/dp83td510.c:458:
+ linkmode_clear_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, phydev->supported);


WARNING: line length of 92 exceeds 80 columns
#560: FILE: drivers/net/phy/dp83td510.c:502:
+ DP83TD510_MAC_CFG_1, dp83td510->rgmii_delay);

WARNING: line length of 88 exceeds 80 columns
#574: FILE: drivers/net/phy/dp83td510.c:516:
+ mst_slave_cfg = phy_read_mmd(phydev, DP83TD510_PMD_DEVADDR, DP83TD510_PMD_CTRL);

WARNING: line length of 84 exceeds 80 columns
#695: FILE: drivers/net/phy/dp83td510.c:637:
+ dp83td510 = devm_kzalloc(&phydev->mdio.dev, sizeof(*dp83td510), GFP_KERNEL);