mbox series

[v2,0/7] dmaengine:Use devm_clk_get_enabled() helpers

Message ID 20240830094118.15458-1-liaoyuanhong@vivo.com (mailing list archive)
Headers show
Series dmaengine:Use devm_clk_get_enabled() helpers | expand

Message

Liao Yuanhong Aug. 30, 2024, 9:41 a.m. UTC
The devm_clk_get_enabled() helpers:
    - call devm_clk_get()
    - call clk_prepare_enable() and register what is needed in order to
     call clk_disable_unprepare() when needed, as a managed resource.

This simplifies the code and avoids the calls to clk_disable_unprepare().
---
v2:remove inappropriate modifications, configure COMPILE_TEST for easy
testing, add devm_clk_getprepaed() for imx sdma device.
---

Liao Yuanhong (7):
  dmaengine:Add COMPILE_TEST for easy testing
  dmaengine:at_hdmac:Use devm_clk_get_enabled() helpers
  dmaengine:dma-jz4780:Use devm_clk_get_enabled() helpers
  dmaengine:imx-dma:Use devm_clk_get_enabled() helpers
  dmaengine:imx-sdma:Use devm_clk_get_prepared() helpers
  dmaengine:milbeaut-hdmac:Use devm_clk_get_enabled() helpers
  dmaengine:uniphier-mdmac:Use devm_clk_get_enabled() helpers

 drivers/dma/Kconfig          |  6 ++--
 drivers/dma/at_hdmac.c       | 16 ++--------
 drivers/dma/dma-jz4780.c     | 18 ++++-------
 drivers/dma/imx-dma.c        | 59 ++++++++++++------------------------
 drivers/dma/imx-sdma.c       | 22 +++-----------
 drivers/dma/milbeaut-hdmac.c | 20 ++++--------
 drivers/dma/uniphier-mdmac.c | 20 ++++--------
 7 files changed, 47 insertions(+), 114 deletions(-)

Comments

Krzysztof Kozlowski Aug. 30, 2024, 6:11 p.m. UTC | #1
On 30/08/2024 11:41, Liao Yuanhong wrote:
> The devm_clk_get_enabled() helpers:
>     - call devm_clk_get()
>     - call clk_prepare_enable() and register what is needed in order to
>      call clk_disable_unprepare() when needed, as a managed resource.
> 
> This simplifies the code and avoids the calls to clk_disable_unprepare().
> ---
> v2:remove inappropriate modifications, configure COMPILE_TEST for easy
> testing, add devm_clk_getprepaed() for imx sdma device.
> ---
> 

Vinod,

Since ~2 weeks there is tremendous amount of trivial patches coming from
vivo.com. I identified at least 6 buggy, where the contributor did not
understand the code. Not sure about intention, but I advise extra
carefulness
when dealing with these "trivial" improvements.

Best regards,
Krzysztof
Vinod Koul Sept. 3, 2024, 5:18 a.m. UTC | #2
On 30-08-24, 20:11, Krzysztof Kozlowski wrote:
> On 30/08/2024 11:41, Liao Yuanhong wrote:
> > The devm_clk_get_enabled() helpers:
> >     - call devm_clk_get()
> >     - call clk_prepare_enable() and register what is needed in order to
> >      call clk_disable_unprepare() when needed, as a managed resource.
> > 
> > This simplifies the code and avoids the calls to clk_disable_unprepare().
> > ---
> > v2:remove inappropriate modifications, configure COMPILE_TEST for easy
> > testing, add devm_clk_getprepaed() for imx sdma device.
> > ---
> > 
> 
> Vinod,
> 
> Since ~2 weeks there is tremendous amount of trivial patches coming from
> vivo.com. I identified at least 6 buggy, where the contributor did not
> understand the code. Not sure about intention, but I advise extra
> carefulness
> when dealing with these "trivial" improvements.

Agree, these are introducing bugs as well..

Vivo folks, please channel your energies into fixing some real problems,
contributing support for your vivo phones including DT, drivers and
running mainline on them...

That would be better use of your and our time :-)

BR