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: <c1cfde01-769d-2904-3be3-a41cc51c1519@cogentembedded.com>
Date:   Wed, 1 Apr 2020 12:03:38 +0300
From:   Sergei Shtylyov <sergei.shtylyov@...entembedded.com>
To:     Tang Bin <tangbin@...s.chinamobile.com>, axboe@...nel.dk
Cc:     linux-ide@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ata:ahci_xgene:use devm_platform_ioremap_resource() to
 simplify code

Hello!

On 01.04.2020 11:49, Tang Bin wrote:

> In this function, devm_platform_ioremap_resource() should be suitable
> to simplify code.
> 
> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> ---
>   drivers/ata/ahci_xgene.c | 21 ++++++---------------
>   1 file changed, 6 insertions(+), 15 deletions(-)
> 
> diff --git a/drivers/ata/ahci_xgene.c b/drivers/ata/ahci_xgene.c
> index 16246c843..061209275 100644
> --- a/drivers/ata/ahci_xgene.c
> +++ b/drivers/ata/ahci_xgene.c
[...]
>   	/* Retrieve the optional IP mux resource */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 4);
> -	if (res) {
> -		void __iomem *csr = devm_ioremap_resource(dev, res);
> -		if (IS_ERR(csr))
> -			return PTR_ERR(csr);
> -
> -		ctx->csr_mux = csr;
> -	}
> +	ctx->csr_mux = devm_platform_ioremap_resource(pdev, 4);
> +	if (IS_ERR(ctx->csr_mux))
> +		return PTR_ERR(ctx->csr_mux);

    The previous code allowed the memory resource #4 to be absent, the new
code makes it mandatory? Is that intentional?

[...]

MBR, Sergei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ