diff mbox series

[net-next,1/3] ezchip: Remove some redundant clean-up functions

Message ID 43e9d047a036cd8a84aad8e9fffdfdcb17a1cf2a.1672865629.git.christophe.jaillet@wanadoo.fr (mailing list archive)
State Changes Requested
Delegated to: Netdev Maintainers
Headers show
Series ezchip: Simplify some code | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net-next
netdev/fixes_present success Fixes tag not required for -next series
netdev/subject_prefix success Link
netdev/cover_letter success Series has a cover letter
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit fail Errors and warnings before: 0 this patch: 1
netdev/cc_maintainers warning 1 maintainers not CCed: hanyihao@vivo.com
netdev/build_clang fail Errors and warnings before: 0 this patch: 2
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn fail Errors and warnings before: 0 this patch: 1
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 14 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Christophe JAILLET Jan. 4, 2023, 9:05 p.m. UTC
free_netdev() already calls netif_napi_del(), no need to call it
explicitly.
It's harmless, but useless.

Remove the call in the error handling path of the probe and in the remove
function.

Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
 drivers/net/ethernet/ezchip/nps_enet.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Jakub Kicinski Jan. 5, 2023, 4:52 a.m. UTC | #1
On Wed,  4 Jan 2023 22:05:32 +0100 Christophe JAILLET wrote:
> @@ -640,7 +639,6 @@ static s32 nps_enet_remove(struct platform_device *pdev)
>  	struct nps_enet_priv *priv = netdev_priv(ndev);
>  
>  	unregister_netdev(ndev);
> -	netif_napi_del(&priv->napi);
>  	free_netdev(ndev);

This adds an unused variable warning, which is fixed by the next patch.
Could you remove the @priv variable here already?
diff mbox series

Patch

diff --git a/drivers/net/ethernet/ezchip/nps_enet.c b/drivers/net/ethernet/ezchip/nps_enet.c
index f1eb660aaee2..6389c6b5005c 100644
--- a/drivers/net/ethernet/ezchip/nps_enet.c
+++ b/drivers/net/ethernet/ezchip/nps_enet.c
@@ -627,7 +627,6 @@  static s32 nps_enet_probe(struct platform_device *pdev)
 	return 0;
 
 out_netif_api:
-	netif_napi_del(&priv->napi);
 out_netdev:
 	free_netdev(ndev);
 
@@ -640,7 +639,6 @@  static s32 nps_enet_remove(struct platform_device *pdev)
 	struct nps_enet_priv *priv = netdev_priv(ndev);
 
 	unregister_netdev(ndev);
-	netif_napi_del(&priv->napi);
 	free_netdev(ndev);
 
 	return 0;