lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8ddf8cc7-0611-4c04-b814-be13ae14dedf@microchip.com>
Date: Fri, 30 Aug 2024 14:24:18 +0200
From: Nicolas Ferre <nicolas.ferre@...rochip.com>
To: Liao Yuanhong <liaoyuanhong@...o.com>, <vkoul@...nel.org>
CC: <dmaengine@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
	<linux-kernel@...r.kernel.org>, <imx@...ts.linux.dev>
Subject: Re: [PATCH v2 2/7] dmaengine:at_hdmac:Use devm_clk_get_enabled()
 helpers

On 30/08/2024 at 11:41, Liao Yuanhong wrote:
> Use devm_clk_get_enabled() instead of clk functions in at_hdmac.

I don't see how it could work: so please disregard at_hdmac when playing 
with "simplification". No subsequent version of this thing please.

NACK (again).

Best regards,
   Nicolas

> Signed-off-by: Liao Yuanhong <liaoyuanhong@...o.com>
> ---
> v2:remove modifications related to the resume operation.
> ---
>   drivers/dma/at_hdmac.c | 16 ++--------------
>   1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c
> index 40052d1bd0b5..2274aeb58271 100644
> --- a/drivers/dma/at_hdmac.c
> +++ b/drivers/dma/at_hdmac.c
> @@ -1975,20 +1975,16 @@ static int __init at_dma_probe(struct platform_device *pdev)
>          atdma->dma_device.cap_mask = plat_dat->cap_mask;
>          atdma->all_chan_mask = (1 << plat_dat->nr_channels) - 1;
> 
> -       atdma->clk = devm_clk_get(&pdev->dev, "dma_clk");
> +       atdma->clk = devm_clk_get_enabled(&pdev->dev, "dma_clk");
>          if (IS_ERR(atdma->clk))
>                  return PTR_ERR(atdma->clk);
> 
> -       err = clk_prepare_enable(atdma->clk);
> -       if (err)
> -               return err;
> -
>          /* force dma off, just in case */
>          at_dma_off(atdma);
> 
>          err = request_irq(irq, at_dma_interrupt, 0, "at_hdmac", atdma);
>          if (err)
> -               goto err_irq;
> +               return err;
> 
>          platform_set_drvdata(pdev, atdma);
> 
> @@ -2105,8 +2101,6 @@ static int __init at_dma_probe(struct platform_device *pdev)
>          dma_pool_destroy(atdma->lli_pool);
>   err_desc_pool_create:
>          free_irq(platform_get_irq(pdev, 0), atdma);
> -err_irq:
> -       clk_disable_unprepare(atdma->clk);
>          return err;
>   }
> 
> @@ -2130,16 +2124,11 @@ static void at_dma_remove(struct platform_device *pdev)
>                  atc_disable_chan_irq(atdma, chan->chan_id);
>                  list_del(&chan->device_node);
>          }
> -
> -       clk_disable_unprepare(atdma->clk);
>   }
> 
>   static void at_dma_shutdown(struct platform_device *pdev)
>   {
> -       struct at_dma   *atdma = platform_get_drvdata(pdev);
> -
>          at_dma_off(platform_get_drvdata(pdev));
> -       clk_disable_unprepare(atdma->clk);
>   }
> 
>   static int at_dma_prepare(struct device *dev)
> @@ -2194,7 +2183,6 @@ static int at_dma_suspend_noirq(struct device *dev)
> 
>          /* disable DMA controller */
>          at_dma_off(atdma);
> -       clk_disable_unprepare(atdma->clk);
>          return 0;
>   }
> 
> --
> 2.25.1
> 
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ