can: xilinx_can: remove redundent netif_napi_del from xcan_remove
Subsystems (5)
PATCH 1/1 can: xilinx_can: remove redundent netif_napi_del from xcan_remove
Since netif_napi_del is already done in the free_candev, so we remove this redundent netif_napi_del invocation. In addition, this patch can match the operations in the xcan_probe and xcan_remove functions.
--- drivers/net/can/xilinx_can.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/can/xilinx_can.c +0 -1
@@ -1848,7 +1848,6 @@ static int xcan_remove(struct platform_device *pdev)unregister_candev (ndev);pm_runtime_disable (&pdev->dev); -netif_napi_del (&priv->napi);free_candev (ndev);return 0 ;
Signature · 1 line
2.25.1
Marc Kleine-Budde
maintainerQuoted 2 lines · Dongliang Mu
Since
netif_napi_delis already done in thefree_candev, so we remove this redundentnetif_napi_delinvocation. In addition, this patch can
^^^^^^^^^
redundant, fixed (also in subject)
Quoted 3 lines
match the operations in the
xcan_probeandxcan_removefunctions.Signed-off-by Dongliang Mu <[email protected]>
Applied to linux-can-next/testing
regards,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 6 lines · Marc Kleine-Budde
Quoted 2 lines · Dongliang Mu
Since
netif_napi_delis already done in thefree_candev, so we remove this redundentnetif_napi_delinvocation. In addition, this patch can^^^^^^^^^redundant, fixed (also in subject)
:\ Sorry about this typo.
Quoted 14 lines
Quoted 3 lines
match the operations in the
xcan_probeandxcan_removefunctions.Signed-off-by Dongliang Mu <[email protected]>Applied to linux-can-next/testing
regards,
Marc--
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Marc Kleine-Budde
maintainerQuoted 14 lines · Dongliang Mu
Since
netif_napi_delis already done in thefree_candev, so we remove this redundentnetif_napi_delinvocation. In addition, this patch can match the operations in thexcan_probeandxcan_removefunctions.Signed-off-by Dongliang Mu <[email protected]>--- drivers/net/can/xilinx_can.c | 1 - 1 file changed, 1 deletion(-)drivers/net/can/xilinx_can.c +0
-0
drivers/net/can/xilinx_can.c static int xcan_remove(struct platform_device *pdev) · line 1853
Quoted 7 lines
drivers/net/can/xilinx_can.c +0
-1@@ -1848,7 +1848,6 @@ static int xcan_remove(struct platform_device *pdev)unregister_candev (ndev);pm_runtime_disable (&pdev->dev); -netif_napi_del (&priv->napi);free_candev (ndev);return 0 ;
Fixed the following error:
| drivers/net/can/xilinx_can.c: In function ‘xcan_remove’: | drivers/net/can/xilinx_can.c:1847:20: error: unused variable ‘priv’ [-Werror=unused-variable] | 1847 | struct xcan_priv *priv = netdev_priv(ndev); | | ^~~~
regards,
Marc
Signature · 4 lines
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Quoted 22 lines · Marc Kleine-Budde
Quoted 20 lines · Dongliang Mu
Since
netif_napi_delis already done in thefree_candev, so we remove this redundentnetif_napi_delinvocation. In addition, this patch can match the operations in thexcan_probeandxcan_removefunctions.Signed-off-by Dongliang Mu <[email protected]>--- drivers/net/can/xilinx_can.c | 1 - 1 file changed, 1 deletion(-)drivers/net/can/xilinx_can.c +0
-1@@ -1848,7 +1848,6 @@ static int xcan_remove(struct platform_device *pdev)unregister_candev (ndev);pm_runtime_disable (&pdev->dev); -netif_napi_del (&priv->napi);free_candev (ndev);
Quoted 8 lines
drivers/net/can/xilinx_can.c static int xcan_remove(struct platform_device *pdev) · line 1853
Quoted 1 line
drivers/net/can/xilinx_can.c +0
-0return 0 ;Fixed the following error:
| drivers/net/can/xilinx_can.c: In function ‘xcan_remove’: | drivers/net/can/xilinx_can.c:1847:20: error: unused variable ‘priv’ [-Werror=unused-variable] | 1847 | struct xcan_priv *priv = netdev_priv(ndev); | | ^~~~
For now, xilinx_can already enables "-Werror" proposed by Linus?
That's my problem. Sorry for that.
Quoted 9 lines
regards,
Marc--
Pengutronix e.K. | Marc Kleine-Budde | Embedded Linux | https://www.pengutronix.de | Vertretung West/Dortmund | Phone: +49-231-2826-924 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |