mbox series

[net-next,00/22] convert to devm_stmmac_probe_config_dt

Message ID 20230829104033.955-1-jszhang@kernel.org (mailing list archive)
Headers show
Series convert to devm_stmmac_probe_config_dt | expand

Message

Jisheng Zhang Aug. 29, 2023, 10:40 a.m. UTC
Russell pointed out there's a new devm_stmmac_probe_config_dt()
helper now when reviewing my starfive gmac error handling patch[1].
After greping the code, this nice helper was introduced by Bartosz in
[2], I think it's time to convert all dwmac users to this helper and
finally complete the TODO in [2] "but once all users of the old
stmmac_pltfr_remove() are converted to the devres helper, it will be
renamed back to stmmac_pltfr_remove() and the no_dt function removed."

Link: https://lore.kernel.org/netdev/ZOtWmedBsa6wQQ6+@shell.armlinux.org.uk/ [1]
Link: https://lore.kernel.org/all/20230623100417.93592-1-brgl@bgdev.pl/  [2]

Jisheng Zhang (22):
  net: stmmac: dwmac-anarion: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-dwc-qos-eth: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-generic: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-generic: use devm_stmmac_pltfr_probe()
  net: stmmac: dwmac-imx: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-ingenic: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-intel-plat: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-ipq806x: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-lpc18xx: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-mediatek: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-meson: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-meson8b: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-rk: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-socfpga: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-starfive: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-sti: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-stm32: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-sun8i: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-sunxi: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-tegra: use devm_stmmac_probe_config_dt()
  net: stmmac: dwmac-visconti: use devm_stmmac_probe_config_dt()
  net: stmmac: rename stmmac_pltfr_remove_no_dt to stmmac_pltfr_remove

 .../ethernet/stmicro/stmmac/dwmac-anarion.c   | 10 +---
 .../stmicro/stmmac/dwmac-dwc-qos-eth.c        | 15 ++----
 .../ethernet/stmicro/stmmac/dwmac-generic.c   | 15 +-----
 .../net/ethernet/stmicro/stmmac/dwmac-imx.c   | 13 ++---
 .../ethernet/stmicro/stmmac/dwmac-ingenic.c   | 33 ++++--------
 .../stmicro/stmmac/dwmac-intel-plat.c         | 25 +++------
 .../ethernet/stmicro/stmmac/dwmac-ipq806x.c   | 27 +++-------
 .../ethernet/stmicro/stmmac/dwmac-lpc18xx.c   | 19 ++-----
 .../ethernet/stmicro/stmmac/dwmac-mediatek.c  |  6 +--
 .../net/ethernet/stmicro/stmmac/dwmac-meson.c | 25 +++------
 .../ethernet/stmicro/stmmac/dwmac-meson8b.c   | 53 ++++++-------------
 .../net/ethernet/stmicro/stmmac/dwmac-rk.c    | 14 ++---
 .../ethernet/stmicro/stmmac/dwmac-socfpga.c   | 16 +++---
 .../ethernet/stmicro/stmmac/dwmac-starfive.c  | 10 +---
 .../net/ethernet/stmicro/stmmac/dwmac-sti.c   | 14 ++---
 .../net/ethernet/stmicro/stmmac/dwmac-stm32.c | 17 +++---
 .../net/ethernet/stmicro/stmmac/dwmac-sun8i.c |  6 +--
 .../net/ethernet/stmicro/stmmac/dwmac-sunxi.c | 23 +++-----
 .../net/ethernet/stmicro/stmmac/dwmac-tegra.c | 10 ++--
 .../ethernet/stmicro/stmmac/dwmac-visconti.c  | 12 ++---
 .../ethernet/stmicro/stmmac/stmmac_platform.c | 23 ++------
 .../ethernet/stmicro/stmmac/stmmac_platform.h |  1 -
 22 files changed, 110 insertions(+), 277 deletions(-)

Comments

Russell King (Oracle) Aug. 29, 2023, 11:21 a.m. UTC | #1
On Tue, Aug 29, 2023 at 06:40:11PM +0800, Jisheng Zhang wrote:
> Russell pointed out there's a new devm_stmmac_probe_config_dt()
> helper now when reviewing my starfive gmac error handling patch[1].
> After greping the code, this nice helper was introduced by Bartosz in
> [2], I think it's time to convert all dwmac users to this helper and
> finally complete the TODO in [2] "but once all users of the old
> stmmac_pltfr_remove() are converted to the devres helper, it will be
> renamed back to stmmac_pltfr_remove() and the no_dt function removed."

I think a useful final patch may be to make stmmac_probe_config_dt()
static so there aren't any new uses of stmmac_probe_config_dt().

Also note that net-next is now closed, so please wait until after -rc1
for net-next to re-open, or post as RFC. Thanks.
Jisheng Zhang Aug. 29, 2023, 11:29 a.m. UTC | #2
On Tue, Aug 29, 2023 at 12:21:29PM +0100, Russell King (Oracle) wrote:
> On Tue, Aug 29, 2023 at 06:40:11PM +0800, Jisheng Zhang wrote:
> > Russell pointed out there's a new devm_stmmac_probe_config_dt()
> > helper now when reviewing my starfive gmac error handling patch[1].
> > After greping the code, this nice helper was introduced by Bartosz in
> > [2], I think it's time to convert all dwmac users to this helper and
> > finally complete the TODO in [2] "but once all users of the old
> > stmmac_pltfr_remove() are converted to the devres helper, it will be
> > renamed back to stmmac_pltfr_remove() and the no_dt function removed."
> 
> I think a useful final patch may be to make stmmac_probe_config_dt()
> static so there aren't any new uses of stmmac_probe_config_dt().

Good idea!
> 
> Also note that net-next is now closed, so please wait until after -rc1
> for net-next to re-open, or post as RFC. Thanks.

oops, I didn't notice this cycle of window is closed, I will wait for next
development window.

Thank you
> 
> -- 
> RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Emil Renner Berthing Aug. 29, 2023, 1:22 p.m. UTC | #3
On Tue, 29 Aug 2023 at 13:41, Jisheng Zhang <jszhang@kernel.org> wrote:
>
> On Tue, Aug 29, 2023 at 12:21:29PM +0100, Russell King (Oracle) wrote:
> > On Tue, Aug 29, 2023 at 06:40:11PM +0800, Jisheng Zhang wrote:
> > > Russell pointed out there's a new devm_stmmac_probe_config_dt()
> > > helper now when reviewing my starfive gmac error handling patch[1].
> > > After greping the code, this nice helper was introduced by Bartosz in
> > > [2], I think it's time to convert all dwmac users to this helper and
> > > finally complete the TODO in [2] "but once all users of the old
> > > stmmac_pltfr_remove() are converted to the devres helper, it will be
> > > renamed back to stmmac_pltfr_remove() and the no_dt function removed."
> >
> > I think a useful final patch may be to make stmmac_probe_config_dt()
> > static so there aren't any new uses of stmmac_probe_config_dt().
>
> Good idea!

Once this is done are there any users of stmmac_pltfr_remove() left?
If not it would be great to remove that too and maybe even remove the
_no_dt from stmmac_pltfr_remove_no_dt().

> >
> > Also note that net-next is now closed, so please wait until after -rc1
> > for net-next to re-open, or post as RFC. Thanks.
>
> oops, I didn't notice this cycle of window is closed, I will wait for next
> development window.
>
> Thank you
> >
> > --
> > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> > FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!
Emil Renner Berthing Aug. 29, 2023, 1:27 p.m. UTC | #4
On Tue, 29 Aug 2023 at 15:22, Emil Renner Berthing <kernel@esmil.dk> wrote:
>
> On Tue, 29 Aug 2023 at 13:41, Jisheng Zhang <jszhang@kernel.org> wrote:
> >
> > On Tue, Aug 29, 2023 at 12:21:29PM +0100, Russell King (Oracle) wrote:
> > > On Tue, Aug 29, 2023 at 06:40:11PM +0800, Jisheng Zhang wrote:
> > > > Russell pointed out there's a new devm_stmmac_probe_config_dt()
> > > > helper now when reviewing my starfive gmac error handling patch[1].
> > > > After greping the code, this nice helper was introduced by Bartosz in
> > > > [2], I think it's time to convert all dwmac users to this helper and
> > > > finally complete the TODO in [2] "but once all users of the old
> > > > stmmac_pltfr_remove() are converted to the devres helper, it will be
> > > > renamed back to stmmac_pltfr_remove() and the no_dt function removed."
> > >
> > > I think a useful final patch may be to make stmmac_probe_config_dt()
> > > static so there aren't any new uses of stmmac_probe_config_dt().
> >
> > Good idea!
>
> Once this is done are there any users of stmmac_pltfr_remove() left?
> If not it would be great to remove that too and maybe even remove the
> _no_dt from stmmac_pltfr_remove_no_dt().

Sorry about the noise. I should learn to read the full series before replying.

> > >
> > > Also note that net-next is now closed, so please wait until after -rc1
> > > for net-next to re-open, or post as RFC. Thanks.
> >
> > oops, I didn't notice this cycle of window is closed, I will wait for next
> > development window.
> >
> > Thank you
> > >
> > > --
> > > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
> > > FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!