[PATCH] net: hisilicon: hisi-femac: fix NAPI teardown ordering

Subsystems: hisilicon network subsystem driver, networking drivers, the rest

COLD35d

2 messages, 2 authors, 2026-08-18 · open the first message on its own page

[PATCH] net: hisilicon: hisi-femac: fix NAPI teardown ordering

From: Jiawen Liu <hidden>
Date: 2026-08-18 13:13:34

Remove the redundant explicit NAPI deletion from the registered-device
remove path.

The confirmed lifecycle contract is that unregister_netdev() performs
the NAPI teardown. Probe failure cleanup before registration remains
unchanged.

Signed-off-by: jiawen <redacted>
---
diff --git a/drivers/net/ethernet/hisilicon/hisi_femac.c b/drivers/net/ethernet/hisilicon/hisi_femac.c
--- a/drivers/net/ethernet/hisilicon/hisi_femac.c
+++ b/drivers/net/ethernet/hisilicon/hisi_femac.c
@@ -898,7 +898,6 @@
 	struct net_device *ndev = platform_get_drvdata(pdev);
 	struct hisi_femac_priv *priv = netdev_priv(ndev);
 
-	netif_napi_del(&priv->napi);
 	unregister_netdev(ndev);
 
 	phy_disconnect(ndev->phydev);

Re: [PATCH] net: hisilicon: hisi-femac: fix NAPI teardown ordering

From: Jakub Kicinski <kuba@kernel.org>
Date: 2026-08-18 15:06:13

On Tue, 18 Aug 2026 17:13:29 +0400 Jiawen Liu wrote:
Remove the redundant explicit NAPI deletion from the registered-device
remove path.

The confirmed lifecycle contract is that unregister_netdev() performs
the NAPI teardown. Probe failure cleanup before registration remains
unchanged.
We discourage pointless code churn like this.
If you think there's a bug explain it better.
  
See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#clean-up-patches
-- 
pw-bot: reject
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help