Skip to contentSkip to conversation

net: phy: remove unused PHY_INIT_TIMEOUT definitions

PATCH In review Heiner Kallweit 2 participants 3 messages Feb 8, 2025 – Feb 9, 2025

Subsystems (4)
lore
Share & tools
lore

Heiner Kallweit

author maintainer
#0 lore raw

PATCH 1/1 net: phy: remove unused PHY_INIT_TIMEOUT definitions

Both identical definitions of PHY_INIT_TIMEOUT aren't used, so remove them.

---
 drivers/net/ethernet/freescale/ucc_geth.h | 1 -
 include/linux/phy.h                       | 1 -
 2 files changed, 2 deletions(-)
drivers/net/ethernet/freescale/ucc_geth.h +0 -1
index 38789faae..03b515240 100644
@@ -890,7 +890,6 @@ struct ucc_geth_hardware_statistics {
 							   addresses */
 
 #define TX_TIMEOUT                              (1*HZ)
-#define PHY_INIT_TIMEOUT                        100000
 #define PHY_CHANGE_TIME                         2
 
 /* Fast Ethernet (10/100 Mbps) */
include/linux/phy.h +0 -1
index 3028f8abf..9cb86666c 100644
@@ -293,7 +293,6 @@ static inline long rgmii_clock(int speed)
 	}
 }
 
-#define PHY_INIT_TIMEOUT	100000
 #define PHY_FORCE_TIMEOUT	10
 
 #define PHY_MAX_ADDR	32
Signature · 1 line
2.48.1
#1 lore raw

Le 08/02/2025 à 22:14, Heiner Kallweit a écrit :

Quoted 2 lines

Both identical definitions of PHY_INIT_TIMEOUT aren't used, so remove them.

Would be good to say when it stopped being used, ie which commit or commits removed its use.

Also why only remove PHY_INIT_TIMEOUT ? For instance PHY_FORCE_TIMEOUT also seems to be unused. PHY_CHANGE_TIME as well.

Quoted 31 lines
---
  drivers/net/ethernet/freescale/ucc_geth.h | 1 -
  include/linux/phy.h                       | 1 -
  2 files changed, 2 deletions(-)
drivers/net/ethernet/freescale/ucc_geth.h +0 -1
index 38789faae..03b515240 100644
@@ -890,7 +890,6 @@ struct ucc_geth_hardware_statistics {
  							   addresses */
 
  #define TX_TIMEOUT                              (1*HZ)
-#define PHY_INIT_TIMEOUT                        100000
  #define PHY_CHANGE_TIME                         2
 
  /* Fast Ethernet (10/100 Mbps) */
include/linux/phy.h +0 -1
index 3028f8abf..9cb86666c 100644
@@ -293,7 +293,6 @@ static inline long rgmii_clock(int speed)
  	}
  }
 
-#define PHY_INIT_TIMEOUT	100000
  #define PHY_FORCE_TIMEOUT	10
 
  #define PHY_MAX_ADDR	32
author maintainer
#2 lore raw
Quoted 10 lines · Christophe Leroy

Le 08/02/2025 à 22:14, Heiner Kallweit a écrit :

Quoted 2 lines

Both identical definitions of PHY_INIT_TIMEOUT aren't used, so remove them.

Would be good to say when it stopped being used, ie which commit or commits removed its use.

Also why only remove PHY_INIT_TIMEOUT ? For instance PHY_FORCE_TIMEOUT also seems to be unused. PHY_CHANGE_TIME as well.

I stumbled just across PHY_INIT_TIMEOUT. You're right, I will include other apparently unused definitions as well.

Quoted 19 lines
Quoted 19 lines

---
  drivers/net/ethernet/freescale/ucc_geth.h | 1 -
  include/linux/phy.h                       | 1 -

  2 files changed, 2 deletions(-)
drivers/net/ethernet/freescale/ucc_geth.h +0 -0
index 38789faae..03b515240 100644
@@ -890,7 +890,6 @@ struct ucc_geth_hardware_statistics {

                                 addresses */ #define TX_TIMEOUT                              (1*HZ) -#define PHY_INIT_TIMEOUT                        100000 #define PHY_CHANGE_TIME                         2 /* Fast Ethernet (10/100 Mbps) */

include/linux/phy.h +0 -0
index 3028f8abf..9cb86666c 100644
Quoted 9 lines
Quoted 8 lines
include/linux/phy.h +0 -0
@@ -293,7 +293,6 @@ static inline long rgmii_clock(int speed)
       }
   }

  -#define PHY_INIT_TIMEOUT    100000
  #define PHY_FORCE_TIMEOUT    10
    #define PHY_MAX_ADDR    32

--
pw-bot: cr