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]
Message-ID: <Y3H9p38pzqvpjkID@yilunxu-OptiPlex-7050>
Date:   Mon, 14 Nov 2022 16:34:47 +0800
From:   Xu Yilun <yilun.xu@...el.com>
To:     ye.xingchen@....com.cn
Cc:     mdf@...nel.org, hao.wu@...el.com, trix@...hat.com,
        linux-fpga@...r.kernel.org, linux-kernel@...r.kernel.org,
        chi.minghao@....com.cn
Subject: Re: [PATCH] fpga-manager: use
 devm_platform_get_and_ioremap_resource()

On 2022-11-11 at 14:41:16 +0800, ye.xingchen@....com.cn wrote:
> From: Minghao Chi <chi.minghao@....com.cn>
> 
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
> 
> Reported-by: Zeal Robot <zealci@....com.cn>
> Signed-off-by: Minghao Chi <chi.minghao@....com.cn>

Please add your own SoB.

> ---
>  drivers/fpga/socfpga-a10.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/fpga/socfpga-a10.c b/drivers/fpga/socfpga-a10.c
> index ac8e89b8a5cc..dde2cb49e95d 100644
> --- a/drivers/fpga/socfpga-a10.c
> +++ b/drivers/fpga/socfpga-a10.c
> @@ -479,8 +479,7 @@ static int socfpga_a10_fpga_probe(struct platform_device *pdev)
>  		return -ENOMEM;
> 
>  	/* First mmio base is for register access */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	reg_base = devm_ioremap_resource(dev, res);
> +	reg_base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);

Why keep the variable res?

>  	if (IS_ERR(reg_base))
>  		return PTR_ERR(reg_base);

And please make all related changes, at least in driver/fpga.

Thanks,
Yilun

> 
> -- 
> 2.25.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ