phy: qcom-qmp-pcie: drop if (table) conditions
authorDmitry Baryshkov <dmitry.baryshkov@linaro.org>
Tue, 6 Sep 2022 07:45:48 +0000 (09:45 +0200)
committerVinod Koul <vkoul@kernel.org>
Tue, 13 Sep 2022 14:53:36 +0000 (20:23 +0530)
Drop unused if (table) conditions, since the function
qcom_qmp_phy_pcie_configure_lane() has this check anyway.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Link: https://lore.kernel.org/r/20220906074550.4383-2-johan+linaro@kernel.org
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/phy/qualcomm/phy-qcom-qmp-pcie.c

index 3ddbb8e..536a6ac 100644 (file)
@@ -1930,8 +1930,7 @@ static int qcom_qmp_phy_pcie_serdes_init(struct qmp_phy *qphy)
        int serdes_tbl_num = cfg->serdes_tbl_num;
 
        qcom_qmp_phy_pcie_configure(serdes, cfg->regs, serdes_tbl, serdes_tbl_num);
-       if (cfg->serdes_tbl_sec)
-               qcom_qmp_phy_pcie_configure(serdes, cfg->regs, cfg->serdes_tbl_sec,
+       qcom_qmp_phy_pcie_configure(serdes, cfg->regs, cfg->serdes_tbl_sec,
                                       cfg->serdes_tbl_num_sec);
 
        return 0;
@@ -2037,44 +2036,38 @@ static int qcom_qmp_phy_pcie_power_on(struct phy *phy)
        /* Tx, Rx, and PCS configurations */
        qcom_qmp_phy_pcie_configure_lane(tx, cfg->regs,
                                    cfg->tx_tbl, cfg->tx_tbl_num, 1);
-       if (cfg->tx_tbl_sec)
-               qcom_qmp_phy_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl_sec,
+       qcom_qmp_phy_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl_sec,
                                            cfg->tx_tbl_num_sec, 1);
 
        /* Configuration for other LANE for USB-DP combo PHY */
        if (cfg->is_dual_lane_phy) {
                qcom_qmp_phy_pcie_configure_lane(qphy->tx2, cfg->regs,
                                            cfg->tx_tbl, cfg->tx_tbl_num, 2);
-               if (cfg->tx_tbl_sec)
-                       qcom_qmp_phy_pcie_configure_lane(qphy->tx2, cfg->regs,
+               qcom_qmp_phy_pcie_configure_lane(qphy->tx2, cfg->regs,
                                                    cfg->tx_tbl_sec,
                                                    cfg->tx_tbl_num_sec, 2);
        }
 
        qcom_qmp_phy_pcie_configure_lane(rx, cfg->regs,
                                    cfg->rx_tbl, cfg->rx_tbl_num, 1);
-       if (cfg->rx_tbl_sec)
-               qcom_qmp_phy_pcie_configure_lane(rx, cfg->regs,
+       qcom_qmp_phy_pcie_configure_lane(rx, cfg->regs,
                                            cfg->rx_tbl_sec, cfg->rx_tbl_num_sec, 1);
 
        if (cfg->is_dual_lane_phy) {
                qcom_qmp_phy_pcie_configure_lane(qphy->rx2, cfg->regs,
                                            cfg->rx_tbl, cfg->rx_tbl_num, 2);
-               if (cfg->rx_tbl_sec)
-                       qcom_qmp_phy_pcie_configure_lane(qphy->rx2, cfg->regs,
+               qcom_qmp_phy_pcie_configure_lane(qphy->rx2, cfg->regs,
                                                    cfg->rx_tbl_sec,
                                                    cfg->rx_tbl_num_sec, 2);
        }
 
        qcom_qmp_phy_pcie_configure(pcs, cfg->regs, cfg->pcs_tbl, cfg->pcs_tbl_num);
-       if (cfg->pcs_tbl_sec)
-               qcom_qmp_phy_pcie_configure(pcs, cfg->regs, cfg->pcs_tbl_sec,
+       qcom_qmp_phy_pcie_configure(pcs, cfg->regs, cfg->pcs_tbl_sec,
                                       cfg->pcs_tbl_num_sec);
 
        qcom_qmp_phy_pcie_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl,
                               cfg->pcs_misc_tbl_num);
-       if (cfg->pcs_misc_tbl_sec)
-               qcom_qmp_phy_pcie_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl_sec,
+       qcom_qmp_phy_pcie_configure(pcs_misc, cfg->regs, cfg->pcs_misc_tbl_sec,
                                       cfg->pcs_misc_tbl_num_sec);
 
        /*