Skip to contentSkip to conversation

miiphy.h: Remove CONFIG_DM_xxx guards

PATCH New Tom Rini 1 participant 1 message Jan 18, 2022

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 miiphy.h: Remove CONFIG_DM_xxx guards

Function prototypes must not be guarded with ifdef tests. Doing so prevents us from doing:
if (CONFIG_IS_ENABLED(FOO))
func();

as that results in a warning when CONFIG_FOO is not enabled.

---
I forgot that I had this applied when pushing before, as it's required by the aspeed mii changes.

 include/miiphy.h | 8 --------
 1 file changed, 8 deletions(-)
include/miiphy.h +0 -8
index 8b77bac01e6a..77a00359587b 100644
@@ -126,8 +126,6 @@ int bb_miiphy_write(struct mii_dev *miidev, int addr, int devad, int reg,
 #define ESTATUS_1000XF		0x8000
 #define ESTATUS_1000XH		0x4000
 
-#ifdef CONFIG_DM_MDIO
-
 /**
  * struct mdio_perdev_priv - Per-device class data for MDIO DM
  *
@@ -185,10 +183,6 @@ struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
  */
 struct phy_device *dm_eth_phy_connect(struct udevice *ethdev);
 
-#endif
-
-#ifdef CONFIG_DM_MDIO_MUX
-
 /* indicates none of the child buses is selected */
 #define MDIO_MUX_SELECT_NONE	-1
 
@@ -206,5 +200,3 @@ struct mdio_mux_ops {
 #define mdio_mux_get_ops(dev) ((struct mdio_mux_ops *)(dev)->driver->ops)
 
 #endif
-
-#endif
Signature · 1 line
2.25.1