[PATCH net-next 00/12] net: Convert using devm_clk_get_enabled()/devm_clk_get_optional_enabled()
Li Zetao
lizetao1 at huawei.com
Fri Aug 30 19:13:22 PDT 2024
There are many examples[1][2] of clk resource leakage in LTS. The
reason is that developers need to maintain the allocation and release
of clk resources themselves, but this will increase the burden on
developers. Using the API related to devm_clk_get_*_enable ensures
that the life cycle of clk is consistent with that of the device,
reducing the risk of unreleased resources like clk.
Several other developers are also working on converting to more
secure interfaces, and this patch set is in principle the same as
theirs.
[1]: https://lore.kernel.org/all/20240812160128.338041191@linuxfoundation.org/
[2]: https://lore.kernel.org/all/20240812160135.992451065@linuxfoundation.org/
Li Zetao (12):
net: dsa: bcm_sf2: Convert using devm_clk_get_optional_enabled() in
bcm_sf2_sw_probe()
net: ethernet: Convert using devm_clk_get_enabled() in emac_probe()
net: ethernet: arc: Convert using devm_clk_get_enabled() in
emac_probe()
net: ethernet: ethoc: Convert using devm_clk_get_enabled() in
ethoc_probe()
net: ftgmac100: Convert using devm_clk_get_enabled() in
ftgmac100_setup_clk()
net: ethernet: hisilicon: Convert using devm_clk_get_enabled() in
hisi_femac_drv_probe()
net: lantiq_xrx200: Convert using devm_clk_get_enabled() in
xrx200_probe()
net: stmmac: dwmac-dwc-qos-eth: Convert using devm_clk_get_enabled()
in dwc_qos_probe()
net: ethernet: sunplus: Convert using devm_clk_get_enabled() in
spl2sw_probe()
net: xilinx: axienet: Convert using devm_clk_get_optional_enabled() in
axienet_probe()
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in
wilc_sdio_probe()
wifi: wilc1000: Convert using devm_clk_get_optional_enabled() in
wilc_bus_probe()
drivers/net/dsa/bcm_sf2.c | 28 ++----
drivers/net/ethernet/allwinner/sun4i-emac.c | 13 +--
drivers/net/ethernet/arc/emac_rockchip.c | 34 ++-----
drivers/net/ethernet/ethoc.c | 18 ++--
drivers/net/ethernet/faraday/ftgmac100.c | 27 ++---
drivers/net/ethernet/hisilicon/hisi_femac.c | 17 +---
drivers/net/ethernet/lantiq_xrx200.c | 17 +---
.../stmicro/stmmac/dwmac-dwc-qos-eth.c | 98 ++++---------------
drivers/net/ethernet/sunplus/spl2sw_driver.c | 18 +---
.../net/ethernet/xilinx/xilinx_axienet_main.c | 15 +--
.../net/wireless/microchip/wilc1000/sdio.c | 10 +-
drivers/net/wireless/microchip/wilc1000/spi.c | 5 +-
12 files changed, 64 insertions(+), 236 deletions(-)
--
2.34.1
More information about the Linux-rockchip
mailing list