of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy
diff mbox series

Message ID 20191223100321.7364-1-geert@linux-m68k.org
State Accepted
Commit 7df2281a174bd0fdbb2211a26914e5440740fcde
Headers show
Series
  • of: mdio: Add missing inline to of_mdiobus_child_is_phy() dummy
Related show

Commit Message

Geert Uytterhoeven Dec. 23, 2019, 10:03 a.m. UTC
If CONFIG_OF_MDIO=n:

    drivers/net/phy/mdio_bus.c:23:
    include/linux/of_mdio.h:58:13: warning: ‘of_mdiobus_child_is_phy’ defined but not used [-Wunused-function]
     static bool of_mdiobus_child_is_phy(struct device_node *child)
		 ^~~~~~~~~~~~~~~~~~~~~~~

Fix this by adding the missing "inline" keyword.

Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
 include/linux/of_mdio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn Dec. 23, 2019, 10:51 a.m. UTC | #1
On Mon, Dec 23, 2019 at 11:03:21AM +0100, Geert Uytterhoeven wrote:
> If CONFIG_OF_MDIO=n:
> 
>     drivers/net/phy/mdio_bus.c:23:
>     include/linux/of_mdio.h:58:13: warning: ‘of_mdiobus_child_is_phy’ defined but not used [-Wunused-function]
>      static bool of_mdiobus_child_is_phy(struct device_node *child)
> 		 ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix this by adding the missing "inline" keyword.
> 
> Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Borislav Petkov Dec. 23, 2019, 11:10 a.m. UTC | #2
On Mon, Dec 23, 2019 at 11:03:21AM +0100, Geert Uytterhoeven wrote:
> If CONFIG_OF_MDIO=n:
> 
>     drivers/net/phy/mdio_bus.c:23:
>     include/linux/of_mdio.h:58:13: warning: ‘of_mdiobus_child_is_phy’ defined but not used [-Wunused-function]
>      static bool of_mdiobus_child_is_phy(struct device_node *child)
> 		 ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix this by adding the missing "inline" keyword.
> 
> Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  include/linux/of_mdio.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
> index 79bc82e30c02333d..491a2b7e77c1e906 100644
> --- a/include/linux/of_mdio.h
> +++ b/include/linux/of_mdio.h
> @@ -55,7 +55,7 @@ static inline int of_mdio_parse_addr(struct device *dev,
>  }
>  
>  #else /* CONFIG_OF_MDIO */
> -static bool of_mdiobus_child_is_phy(struct device_node *child)
> +static inline bool of_mdiobus_child_is_phy(struct device_node *child)
>  {
>  	return false;
>  }
> -- 

I'm seeing it too with rc3.

Acked-by: Borislav Petkov <bp@suse.de>

Thx.
David Miller Dec. 26, 2019, 11:17 p.m. UTC | #3
From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: Mon, 23 Dec 2019 11:03:21 +0100

> If CONFIG_OF_MDIO=n:
> 
>     drivers/net/phy/mdio_bus.c:23:
>     include/linux/of_mdio.h:58:13: warning: ‘of_mdiobus_child_is_phy’ defined but not used [-Wunused-function]
>      static bool of_mdiobus_child_is_phy(struct device_node *child)
> 		 ^~~~~~~~~~~~~~~~~~~~~~~
> 
> Fix this by adding the missing "inline" keyword.
> 
> Fixes: 0aa4d016c043d16a ("of: mdio: export of_mdiobus_child_is_phy")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Applied, thank you.

Patch
diff mbox series

diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 79bc82e30c02333d..491a2b7e77c1e906 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -55,7 +55,7 @@  static inline int of_mdio_parse_addr(struct device *dev,
 }
 
 #else /* CONFIG_OF_MDIO */
-static bool of_mdiobus_child_is_phy(struct device_node *child)
+static inline bool of_mdiobus_child_is_phy(struct device_node *child)
 {
 	return false;
 }