netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] ibm: emac: remove unused emac_link_differs function
@ 2026-01-07  7:36 Ethan Nelson-Moore
  2026-01-08  2:56 ` Jakub Kicinski
  0 siblings, 1 reply; 2+ messages in thread
From: Ethan Nelson-Moore @ 2026-01-07  7:36 UTC (permalink / raw)
  To: netdev; +Cc: Ethan Nelson-Moore

Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>
---
 drivers/net/ethernet/ibm/emac/core.c | 33 ----------------------------
 1 file changed, 33 deletions(-)

diff --git a/drivers/net/ethernet/ibm/emac/core.c b/drivers/net/ethernet/ibm/emac/core.c
index 417dfa18daae..72936d47d011 100644
--- a/drivers/net/ethernet/ibm/emac/core.c
+++ b/drivers/net/ethernet/ibm/emac/core.c
@@ -1277,39 +1277,6 @@ static int emac_open(struct net_device *ndev)
 	return -ENOMEM;
 }
 
-/* BHs disabled */
-#if 0
-static int emac_link_differs(struct emac_instance *dev)
-{
-	u32 r = in_be32(&dev->emacp->mr1);
-
-	int duplex = r & EMAC_MR1_FDE ? DUPLEX_FULL : DUPLEX_HALF;
-	int speed, pause, asym_pause;
-
-	if (r & EMAC_MR1_MF_1000)
-		speed = SPEED_1000;
-	else if (r & EMAC_MR1_MF_100)
-		speed = SPEED_100;
-	else
-		speed = SPEED_10;
-
-	switch (r & (EMAC_MR1_EIFC | EMAC_MR1_APP)) {
-	case (EMAC_MR1_EIFC | EMAC_MR1_APP):
-		pause = 1;
-		asym_pause = 0;
-		break;
-	case EMAC_MR1_APP:
-		pause = 0;
-		asym_pause = 1;
-		break;
-	default:
-		pause = asym_pause = 0;
-	}
-	return speed != dev->phy.speed || duplex != dev->phy.duplex ||
-	    pause != dev->phy.pause || asym_pause != dev->phy.asym_pause;
-}
-#endif
-
 static void emac_link_timer(struct work_struct *work)
 {
 	struct emac_instance *dev =
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] ibm: emac: remove unused emac_link_differs function
  2026-01-07  7:36 [PATCH net-next] ibm: emac: remove unused emac_link_differs function Ethan Nelson-Moore
@ 2026-01-08  2:56 ` Jakub Kicinski
  0 siblings, 0 replies; 2+ messages in thread
From: Jakub Kicinski @ 2026-01-08  2:56 UTC (permalink / raw)
  To: Ethan Nelson-Moore; +Cc: netdev

On Tue,  6 Jan 2026 23:36:01 -0800 Ethan Nelson-Moore wrote:
> Signed-off-by: Ethan Nelson-Moore <enelsonmoore@gmail.com>

missing commit message, but also:

$ git grep '#if 0' -- drivers/net/ net/ | wc -l
136

Let's not "clean up" ancient code.
Let's wait until we can remove it completely (like you're attempting
with atp)
-- 
pw-bot: cr

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-01-08  2:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-01-07  7:36 [PATCH net-next] ibm: emac: remove unused emac_link_differs function Ethan Nelson-Moore
2026-01-08  2:56 ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).