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] [day] [month] [year] [list]
Date:   Fri, 22 Apr 2022 11:34:31 +0530
From:   Vinod Koul <vkoul@...nel.org>
To:     cgel.zte@...il.com
Cc:     shawnguo@...nel.org, s.hauer@...gutronix.de, kernel@...gutronix.de,
        festevam@...il.com, linux-imx@....com, dmaengine@...r.kernel.org,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Lv Ruyi <lv.ruyi@....com.cn>, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] dma: Make use of the helper function
 devm_platform_ioremap_resource()

On 21-04-22, 08:45, cgel.zte@...il.com wrote:
> From: Lv Ruyi <lv.ruyi@....com.cn>
> 

It is dmaengine: not dma:

Also add driver tag to subject line. git log would help you choosing
right tags

> Use the devm_platform_ioremap_resource() helper instead of calling
> platform_get_resource() and devm_ioremap_resource() separately.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>

Where is the report?

> Signed-off-by: Lv Ruyi <lv.ruyi@....com.cn>
> ---
>  drivers/dma/imx-sdma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/imx-sdma.c b/drivers/dma/imx-sdma.c
> index 6196a7b3956b..cf4667d10f6a 100644
> --- a/drivers/dma/imx-sdma.c
> +++ b/drivers/dma/imx-sdma.c
> @@ -2073,7 +2073,6 @@ static int sdma_probe(struct platform_device *pdev)
>  	const char *fw_name;
>  	int ret;
>  	int irq;
> -	struct resource *iores;
>  	struct resource spba_res;
>  	int i;
>  	struct sdma_engine *sdma;
> @@ -2096,8 +2095,7 @@ static int sdma_probe(struct platform_device *pdev)
>  	if (irq < 0)
>  		return irq;
>  
> -	iores = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	sdma->regs = devm_ioremap_resource(&pdev->dev, iores);
> +	sdma->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(sdma->regs))
>  		return PTR_ERR(sdma->regs);
>  
> -- 
> 2.25.1

-- 
~Vinod

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ