phy: rockchip-pcie: remove unused phy_rd_cfg function

Message ID 20230321122503.1783311-1-trix@redhat.com
State New
Headers
Series phy: rockchip-pcie: remove unused phy_rd_cfg function |

Commit Message

Tom Rix March 21, 2023, 12:25 p.m. UTC
  clang with W=1 reports
drivers/phy/rockchip/phy-rockchip-pcie.c:122:19: error:
  unused function 'phy_rd_cfg' [-Werror,-Wunused-function]
static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy,
                  ^
This function is not used, so remove it.

Signed-off-by: Tom Rix <trix@redhat.com>
---
 drivers/phy/rockchip/phy-rockchip-pcie.c | 15 ---------------
 1 file changed, 15 deletions(-)
  

Comments

Vinod Koul March 31, 2023, 1:53 p.m. UTC | #1
On 21-03-23, 08:25, Tom Rix wrote:
> clang with W=1 reports
> drivers/phy/rockchip/phy-rockchip-pcie.c:122:19: error:
>   unused function 'phy_rd_cfg' [-Werror,-Wunused-function]
> static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy,
>                   ^
> This function is not used, so remove it.

Applied, thanks
  

Patch

diff --git a/drivers/phy/rockchip/phy-rockchip-pcie.c b/drivers/phy/rockchip/phy-rockchip-pcie.c
index 75216091d901..8234b83fdd88 100644
--- a/drivers/phy/rockchip/phy-rockchip-pcie.c
+++ b/drivers/phy/rockchip/phy-rockchip-pcie.c
@@ -119,21 +119,6 @@  static inline void phy_wr_cfg(struct rockchip_pcie_phy *rk_phy,
 				   PHY_CFG_WR_SHIFT));
 }
 
-static inline u32 phy_rd_cfg(struct rockchip_pcie_phy *rk_phy,
-			     u32 addr)
-{
-	u32 val;
-
-	regmap_write(rk_phy->reg_base, rk_phy->phy_data->pcie_conf,
-		     HIWORD_UPDATE(addr,
-				   PHY_CFG_RD_MASK,
-				   PHY_CFG_ADDR_SHIFT));
-	regmap_read(rk_phy->reg_base,
-		    rk_phy->phy_data->pcie_status,
-		    &val);
-	return val;
-}
-
 static int rockchip_pcie_phy_power_off(struct phy *phy)
 {
 	struct phy_pcie_instance *inst = phy_get_drvdata(phy);