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]
Date:   Wed, 4 May 2022 10:28:05 +0800
From:   Baolin Wang <baolin.wang7@...il.com>
To:     Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc:     Vinod Koul <vkoul@...nel.org>, Rob Herring <robh+dt@...nel.org>,
        Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
        Orson Zhai <orsonzhai@...il.com>,
        Chunyan Zhang <zhang.lyra@...il.com>,
        dmaengine@...r.kernel.org,
        Devicetree List <devicetree@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v2 2/3] dmaengine: sprd: deprecate '#dma-channels'

On Tue, May 3, 2022 at 2:51 PM Krzysztof Kozlowski
<krzysztof.kozlowski@...aro.org> wrote:
>
> The generic property, used in most of the drivers and defined in generic
> dma-common DT bindings, is 'dma-channels'.  Switch to new property while
> keeping backward compatibility.
>
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

Thanks.
Reviewed-by: Baolin Wang <baolin.wang7@...il.com>

> ---
>  drivers/dma/sprd-dma.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/sprd-dma.c b/drivers/dma/sprd-dma.c
> index 7f158ef5672d..2138b80435ab 100644
> --- a/drivers/dma/sprd-dma.c
> +++ b/drivers/dma/sprd-dma.c
> @@ -1117,7 +1117,11 @@ static int sprd_dma_probe(struct platform_device *pdev)
>         u32 chn_count;
>         int ret, i;
>
> -       ret = device_property_read_u32(&pdev->dev, "#dma-channels", &chn_count);
> +       /* Parse new and deprecated dma-channels properties */
> +       ret = device_property_read_u32(&pdev->dev, "dma-channels", &chn_count);
> +       if (ret)
> +               ret = device_property_read_u32(&pdev->dev, "#dma-channels",
> +                                              &chn_count);
>         if (ret) {
>                 dev_err(&pdev->dev, "get dma channels count failed\n");
>                 return ret;
> --
> 2.32.0
>


-- 
Baolin Wang

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ