[PATCH net-next 00/11] net: stmmac: Convert to platform remove callback returning void

Uwe Kleine-König u.kleine-koenig at pengutronix.de
Sun Apr 2 07:30:14 PDT 2023


Hello,

this series adapts the platform drivers below
drivers/net/ethernet/stmicro to use the .remove_new() callback. Compared
to the traditional .remove() callback .remove_new() returns no value.
This is a good thing because the driver core doesn't (and cannot) cope
for errors during remove. The only effect of a non-zero return value in
.remove() is that the driver core emits a warning. The device is removed
anyhow and an early return from .remove() usually yields a resource
leak.

The first three commits make sure that the various remove callbacks
(obviously) always return zero. After that all drivers are converted to
.remove_new().

Uwe Kleine-König (11):
  net: stmmac: Make stmmac_pltfr_remove() return void
  net: stmmac: dwmac-visconti: Make visconti_eth_clock_remove() return void
  net: stmmac: dwmac-qcom-ethqos: Drop an if with an always false condition
  net: stmmac: dwmac-visconti: Convert to platform remove callback returning void
  net: stmmac: dwmac-dwc-qos-eth: Convert to platform remove callback returning void
  net: stmmac: dwmac-qcom-ethqos: Convert to platform remove callback returning void
  net: stmmac: dwmac-rk: Convert to platform remove callback returning void
  net: stmmac: dwmac-sti: Convert to platform remove callback returning void
  net: stmmac: dwmac-stm32: Convert to platform remove callback returning void
  net: stmmac: dwmac-sun8i: Convert to platform remove callback returning void
  net: stmmac: dwmac-tegra: Convert to platform remove callback returning void

 .../ethernet/stmicro/stmmac/dwmac-anarion.c   |  2 +-
 .../stmicro/stmmac/dwmac-dwc-qos-eth.c        |  6 ++----
 .../ethernet/stmicro/stmmac/dwmac-generic.c   |  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-imx.c   |  2 +-
 .../ethernet/stmicro/stmmac/dwmac-ingenic.c   |  2 +-
 .../stmicro/stmmac/dwmac-intel-plat.c         |  9 +++------
 .../ethernet/stmicro/stmmac/dwmac-ipq806x.c   |  2 +-
 .../ethernet/stmicro/stmmac/dwmac-lpc18xx.c   |  2 +-
 .../ethernet/stmicro/stmmac/dwmac-mediatek.c  |  9 +++------
 .../net/ethernet/stmicro/stmmac/dwmac-meson.c |  2 +-
 .../ethernet/stmicro/stmmac/dwmac-meson8b.c   |  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-oxnas.c |  2 +-
 .../stmicro/stmmac/dwmac-qcom-ethqos.c        | 15 ++++-----------
 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    |  6 ++----
 .../ethernet/stmicro/stmmac/dwmac-socfpga.c   |  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-sti.c   |  6 ++----
 .../net/ethernet/stmicro/stmmac/dwmac-stm32.c |  6 ++----
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |  6 ++----
 .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c |  2 +-
 .../net/ethernet/stmicro/stmmac/dwmac-tegra.c |  6 ++----
 .../ethernet/stmicro/stmmac/dwmac-visconti.c  | 19 +++++--------------
 .../ethernet/stmicro/stmmac/stmmac_platform.c |  4 +---
 .../ethernet/stmicro/stmmac/stmmac_platform.h |  2 +-
 23 files changed, 40 insertions(+), 76 deletions(-)

base-commit: fe15c26ee26efa11741a7b632e9f23b01aca4cc6
-- 
2.39.2




More information about the linux-amlogic mailing list