net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete
Subsystems (3)
PATCH v2 1/1 net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete
hix5hd2_dev_remove() calls netif_napi_del() before unregister_netdev(). This is not needed because unregister_netdev() deletes all NAPI instances attached to the net_device.
Remove the redundant call and let the networking core tear down the NAPI instance during unregister_netdev(). The probe error path still keeps its explicit netif_napi_del(), because the device has not been registered there.
--- drivers/net/ethernet/hisilicon/hix5hd2_gmac.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/ethernet/hisilicon/hix5hd2_gmac.c +0 -1
@@ -1282,7 +1282,6 @@ static void hix5hd2_dev_remove(struct platform_device *pdev)struct net_device *ndev =platform_get_drvdata (pdev);struct hix5hd2_priv *priv =netdev_priv (ndev); -netif_napi_del (&priv->napi);unregister_netdev (ndev);mdiobus_unregister (priv->bus);mdiobus_free (priv->bus);
Signature · 1 line
2.34.1
This patch was applied to netdev/net.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This patch was applied to netdev/net.git (main)
by Jakub Kicinski <[email protected]>:
Quoted 10 lines · On Tue, 28 Jul 2026 12:17:10 +0400 you wrote:
hix5hd2_dev_remove()callsnetif_napi_del()beforeunregister_netdev(). This is not needed becauseunregister_netdev()deletes all NAPI instances attached to thenet_device.Remove the redundant call and let the networking core tear down the NAPI instance during
unregister_netdev(). The probe error path still keeps its explicitnetif_napi_del(), because the device has not been registered there.[...]
Here is the summary with links:
- [net,v2] net: hisilicon: hix5hd2_gmac: remove redundant NAPI delete
https://git.kernel.org/netdev/net/c/f307a7dc3209
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html