mbox series

[net-next,v2,0/4] net: ethernet: Convert to platform remove callback returning void

Message ID 20231128173823.867512-1-u.kleine-koenig@pengutronix.de (mailing list archive)
Headers show
Series net: ethernet: Convert to platform remove callback returning void | expand

Message

Uwe Kleine-König Nov. 28, 2023, 5:38 p.m. UTC
Hello,

in (implicit) v1 of this series
(https://lore.kernel.org/netdev/20231117091655.872426-1-u.kleine-koenig@pengutronix.de)
I tried to address the resource leaks in the three cpsw drivers. However
this is hard to get right without being able to test the changes. So
here comes a series that just converts all drivers below
drivers/net/ethernet to use .remove_new() and adds a comment about the
potential leaks for someone else to fix the problem.

See commit 5c5a7680e67b ("platform: Provide a remove callback that
returns no value") for an extended explanation and the eventual goal.
The TL;DR; is to prevent bugs like the three noticed here.

Note this series results in no change of behaviour apart from improving
the error message for the three cpsw drivers from

	remove callback returned a non-zero value. This will be ignored.

to

	Failed to resume device (-ESOMETHING)

. 

Best regards
Uwe

Uwe Kleine-König (4):
  net: ethernet: ti: am65-cpsw: Convert to platform remove callback returning void
  net: ethernet: ti: cpsw: Convert to platform remove callback returning void
  net: ethernet: ti: cpsw-new: Convert to platform remove callback returning void
  net: ethernet: ezchip: Convert to platform remove callback returning void

 drivers/net/ethernet/ezchip/nps_enet.c   |  6 ++----
 drivers/net/ethernet/ti/am65-cpsw-nuss.c | 15 ++++++++++-----
 drivers/net/ethernet/ti/cpsw.c           | 15 ++++++++++-----
 drivers/net/ethernet/ti/cpsw_new.c       | 15 ++++++++++-----
 4 files changed, 32 insertions(+), 19 deletions(-)

base-commit: 8c87404c76c1911a7ec5b61bf3b2c3858cb95de1

Comments

patchwork-bot+netdevbpf@kernel.org Nov. 30, 2023, 12:10 p.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 28 Nov 2023 18:38:24 +0100 you wrote:
> Hello,
> 
> in (implicit) v1 of this series
> (https://lore.kernel.org/netdev/20231117091655.872426-1-u.kleine-koenig@pengutronix.de)
> I tried to address the resource leaks in the three cpsw drivers. However
> this is hard to get right without being able to test the changes. So
> here comes a series that just converts all drivers below
> drivers/net/ethernet to use .remove_new() and adds a comment about the
> potential leaks for someone else to fix the problem.
> 
> [...]

Here is the summary with links:
  - [net-next,v2,1/4] net: ethernet: ti: am65-cpsw: Convert to platform remove callback returning void
    https://git.kernel.org/netdev/net-next/c/7234dc5ccba6
  - [net-next,v2,2/4] net: ethernet: ti: cpsw: Convert to platform remove callback returning void
    https://git.kernel.org/netdev/net-next/c/7ac3f867a358
  - [net-next,v2,3/4] net: ethernet: ti: cpsw-new: Convert to platform remove callback returning void
    https://git.kernel.org/netdev/net-next/c/a76772e2fd83
  - [net-next,v2,4/4] net: ethernet: ezchip: Convert to platform remove callback returning void
    https://git.kernel.org/netdev/net-next/c/7ec1bb2ce64b

You are awesome, thank you!