Commit 7961ef1f authored by Christian Marangi's avatar Christian Marangi Committed by David S. Miller

net: phy: at803x: better align function varibles to open parenthesis

Better align function variables to open parenthesis as suggested by
checkpatch script for qca808x function to make code cleaner.

For cable_test_get_status function some additional rework was needed to
handle too long functions.
Signed-off-by: default avatarChristian Marangi <ansuelsmth@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 44a949ad
......@@ -1844,7 +1844,8 @@ static int qca808x_config_init(struct phy_device *phydev)
/* Adjust the threshold on 802.3az for the link 1000M */
ret = phy_write_mmd(phydev, MDIO_MMD_PCS,
QCA808X_PHY_MMD3_AZ_TRAINING_CTRL, QCA808X_MMD3_AZ_TRAINING_VAL);
QCA808X_PHY_MMD3_AZ_TRAINING_CTRL,
QCA808X_MMD3_AZ_TRAINING_VAL);
if (ret)
return ret;
......@@ -1870,7 +1871,8 @@ static int qca808x_config_init(struct phy_device *phydev)
/* Configure adc threshold as 100mv for the link 10M */
return at803x_debug_reg_mask(phydev, QCA808X_PHY_DEBUG_ADC_THRESHOLD,
QCA808X_ADC_THRESHOLD_MASK, QCA808X_ADC_THRESHOLD_100MV);
QCA808X_ADC_THRESHOLD_MASK,
QCA808X_ADC_THRESHOLD_100MV);
}
static int qca808x_read_status(struct phy_device *phydev)
......@@ -2070,18 +2072,22 @@ static int qca808x_cable_test_get_status(struct phy_device *phydev, bool *finish
ethnl_cable_test_result(phydev, ETHTOOL_A_CABLE_PAIR_D,
qca808x_cable_test_result_trans(pair_d));
if (qca808x_cdt_fault_length_valid(pair_a))
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A,
qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A));
if (qca808x_cdt_fault_length_valid(pair_b))
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B,
qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B));
if (qca808x_cdt_fault_length_valid(pair_c))
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C,
qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C));
if (qca808x_cdt_fault_length_valid(pair_d))
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D,
qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D));
if (qca808x_cdt_fault_length_valid(pair_a)) {
val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A);
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_A, val);
}
if (qca808x_cdt_fault_length_valid(pair_b)) {
val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B);
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_B, val);
}
if (qca808x_cdt_fault_length_valid(pair_c)) {
val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C);
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_C, val);
}
if (qca808x_cdt_fault_length_valid(pair_d)) {
val = qca808x_cdt_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D);
ethnl_cable_test_fault_length(phydev, ETHTOOL_A_CABLE_PAIR_D, val);
}
*finished = true;
......@@ -2149,7 +2155,8 @@ static void qca808x_link_change_notify(struct phy_device *phydev)
*/
mdiobus_c45_modify_changed(phydev->mdio.bus, phydev->mdio.addr + 1,
MDIO_MMD_PMAPMD, QCA8081_PHY_SERDES_MMD1_FIFO_CTRL,
QCA8081_PHY_FIFO_RSTN, phydev->link ? QCA8081_PHY_FIFO_RSTN : 0);
QCA8081_PHY_FIFO_RSTN,
phydev->link ? QCA8081_PHY_FIFO_RSTN : 0);
}
static struct phy_driver at803x_driver[] = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment