linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove
@ 2021-10-17 12:50 Dongliang Mu
  2021-10-18  9:12 ` Marc Kleine-Budde
  2021-10-18 10:47 ` Marc Kleine-Budde
  0 siblings, 2 replies; 5+ messages in thread
From: Dongliang Mu @ 2021-10-17 12:50 UTC (permalink / raw)
  To: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Wolfgang Grandegger, Marc Kleine-Budde, David S. Miller,
	Jakub Kicinski, Michal Simek
  Cc: Dongliang Mu, linux-can, netdev, linux-arm-kernel, linux-kernel

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.

Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
---
 drivers/net/can/xilinx_can.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
index 3b883e607d8b..60a3fb369058 100644
--- a/drivers/net/can/xilinx_can.c
+++ b/drivers/net/can/xilinx_can.c
@@ -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;
-- 
2.25.1


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

* Re: [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove
  2021-10-17 12:50 [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove Dongliang Mu
@ 2021-10-18  9:12 ` Marc Kleine-Budde
  2021-10-18  9:13   ` Dongliang Mu
  2021-10-18 10:47 ` Marc Kleine-Budde
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2021-10-18  9:12 UTC (permalink / raw)
  To: Dongliang Mu
  Cc: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Michal Simek, linux-can, netdev, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 709 bytes --]

On 17.10.2021 20:50:21, Dongliang Mu wrote:
> 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
       ^^^^^^^^^
redundant, fixed (also in subject)      
> match the operations in the xcan_probe and xcan_remove functions.
> 
> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>

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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove
  2021-10-18  9:12 ` Marc Kleine-Budde
@ 2021-10-18  9:13   ` Dongliang Mu
  0 siblings, 0 replies; 5+ messages in thread
From: Dongliang Mu @ 2021-10-18  9:13 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Michal Simek, linux-can, open list:NETWORKING [GENERAL],
	linux-arm-kernel, linux-kernel

On Mon, Oct 18, 2021 at 5:12 PM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> On 17.10.2021 20:50:21, Dongliang Mu wrote:
> > 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
>        ^^^^^^^^^
> redundant, fixed (also in subject)

:\ Sorry about this typo.

> > match the operations in the xcan_probe and xcan_remove functions.
> >
> > Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
>
> 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 |

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

* Re: [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove
  2021-10-17 12:50 [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove Dongliang Mu
  2021-10-18  9:12 ` Marc Kleine-Budde
@ 2021-10-18 10:47 ` Marc Kleine-Budde
  2021-10-19  1:44   ` Dongliang Mu
  1 sibling, 1 reply; 5+ messages in thread
From: Marc Kleine-Budde @ 2021-10-18 10:47 UTC (permalink / raw)
  To: Dongliang Mu
  Cc: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Michal Simek, linux-can, netdev, linux-arm-kernel, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1407 bytes --]

On 17.10.2021 20:50:21, Dongliang Mu wrote:
> 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.
> 
> Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
> ---
>  drivers/net/can/xilinx_can.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
> index 3b883e607d8b..60a3fb369058 100644
> --- a/drivers/net/can/xilinx_can.c
> +++ b/drivers/net/can/xilinx_can.c
> @@ -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

-- 
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 |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove
  2021-10-18 10:47 ` Marc Kleine-Budde
@ 2021-10-19  1:44   ` Dongliang Mu
  0 siblings, 0 replies; 5+ messages in thread
From: Dongliang Mu @ 2021-10-19  1:44 UTC (permalink / raw)
  To: Marc Kleine-Budde
  Cc: Appana Durga Kedareswara rao, Naga Sureshkumar Relli,
	Wolfgang Grandegger, David S. Miller, Jakub Kicinski,
	Michal Simek, linux-can, open list:NETWORKING [GENERAL],
	linux-arm-kernel, linux-kernel

On Mon, Oct 18, 2021 at 6:48 PM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> On 17.10.2021 20:50:21, Dongliang Mu wrote:
> > 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.
> >
> > Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
> > ---
> >  drivers/net/can/xilinx_can.c | 1 -
> >  1 file changed, 1 deletion(-)
> >
> > diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c
> > index 3b883e607d8b..60a3fb369058 100644
> > --- a/drivers/net/can/xilinx_can.c
> > +++ b/drivers/net/can/xilinx_can.c
> > @@ -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);
> |       |                    ^~~~

For now, xilinx_can already enables "-Werror" proposed by Linus?

That's my problem. Sorry for that.

>
> 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 |

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

end of thread, other threads:[~2021-10-19  1:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-17 12:50 [PATCH] can: xilinx_can: remove redundent netif_napi_del from xcan_remove Dongliang Mu
2021-10-18  9:12 ` Marc Kleine-Budde
2021-10-18  9:13   ` Dongliang Mu
2021-10-18 10:47 ` Marc Kleine-Budde
2021-10-19  1:44   ` Dongliang Mu

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).