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: <5DA730B2.2@gmail.com>
Date:   Wed, 16 Oct 2019 18:01:06 +0300
From:   Eli Billauer <eli.billauer@...il.com>
To:     YueHaibing <yuehaibing@...wei.com>
CC:     arnd@...db.de, gregkh@...uxfoundation.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] char: xillybus: use devm_platform_ioremap_resource()
 to simplify code

Hello,

Thanks for the patch.

I have to admit that this goes slightly against my instinct not to touch 
code that works. But I'll leave the tradeoff to people who know better 
than me.

Anyhow, I've verified that it compiles well, and the functional 
equivalence is quite obvious.

Regards,
    Eli

Acked-by: Eli Billauer <eli.billauer@...il.com>

On 16/10/19 12:25, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Signed-off-by: YueHaibing<yuehaibing@...wei.com>
> ---
>   drivers/char/xillybus/xillybus_of.c | 5 +----
>   1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/char/xillybus/xillybus_of.c b/drivers/char/xillybus/xillybus_of.c
> index bfafd8f..96b6de8 100644
> --- a/drivers/char/xillybus/xillybus_of.c
> +++ b/drivers/char/xillybus/xillybus_of.c
> @@ -116,7 +116,6 @@ static int xilly_drv_probe(struct platform_device *op)
>   	struct xilly_endpoint *endpoint;
>   	int rc;
>   	int irq;
> -	struct resource *res;
>   	struct xilly_endpoint_hardware *ephw =&of_hw;
>
>   	if (of_property_read_bool(dev->of_node, "dma-coherent"))
> @@ -129,9 +128,7 @@ static int xilly_drv_probe(struct platform_device *op)
>
>   	dev_set_drvdata(dev, endpoint);
>
> -	res = platform_get_resource(op, IORESOURCE_MEM, 0);
> -	endpoint->registers = devm_ioremap_resource(dev, res);
> -
> +	endpoint->registers = devm_platform_ioremap_resource(op, 0);
>   	if (IS_ERR(endpoint->registers))
>   		return PTR_ERR(endpoint->registers);
>
>    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ