phy: rockchip: remove unused hw_to_inno function

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

Commit Message

Tom Rix March 24, 2023, 1:26 p.m. UTC
  clang with W=1 reports
drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:284:36: error:
  unused function 'hw_to_inno' [-Werror,-Wunused-function]
static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)
                                   ^
This function is not used so remove it.

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

Comments

Nick Desaulniers April 7, 2023, 5:41 p.m. UTC | #1
On Fri, Mar 24, 2023 at 6:27 AM Tom Rix <trix@redhat.com> wrote:
>
> clang with W=1 reports
> drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:284:36: error:
>   unused function 'hw_to_inno' [-Werror,-Wunused-function]
> static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)
>                                    ^
> This function is not used so remove it.
>
> Signed-off-by: Tom Rix <trix@redhat.com>

Thanks for the patch!
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>

> ---
>  drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c | 5 -----
>  1 file changed, 5 deletions(-)
>
> diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> index 726928ff1273..401b0aabb159 100644
> --- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> +++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
> @@ -281,11 +281,6 @@ struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_2_5ghz[] = {
>         {2500000000, 0x15, 0x54, 0x7f, 0x15, 0x6a},
>  };
>
> -static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)
> -{
> -       return container_of(hw, struct inno_dsidphy, pll.hw);
> -}
> -
>  static void phy_update_bits(struct inno_dsidphy *inno,
>                             u8 first, u8 second, u8 mask, u8 val)
>  {
> --
> 2.27.0
>
  
Vinod Koul April 12, 2023, 4:17 p.m. UTC | #2
On 24-03-23, 09:26, Tom Rix wrote:
> clang with W=1 reports
> drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c:284:36: error:
>   unused function 'hw_to_inno' [-Werror,-Wunused-function]
> static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)

Applied, thanks
  

Patch

diff --git a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
index 726928ff1273..401b0aabb159 100644
--- a/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
+++ b/drivers/phy/rockchip/phy-rockchip-inno-dsidphy.c
@@ -281,11 +281,6 @@  struct inno_mipi_dphy_timing inno_mipi_dphy_timing_table_max_2_5ghz[] = {
 	{2500000000, 0x15, 0x54, 0x7f, 0x15, 0x6a},
 };
 
-static inline struct inno_dsidphy *hw_to_inno(struct clk_hw *hw)
-{
-	return container_of(hw, struct inno_dsidphy, pll.hw);
-}
-
 static void phy_update_bits(struct inno_dsidphy *inno,
 			    u8 first, u8 second, u8 mask, u8 val)
 {