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]
Message-ID: <fb29db5d-645b-86c7-c31c-738df55687ab@intel.com>
Date:   Thu, 16 Feb 2023 17:56:05 +0100
From:   Alexander Lobakin <aleksander.lobakin@...el.com>
To:     Yang Li <yang.lee@...ux.alibaba.com>
CC:     <kuba@...nel.org>, <davem@...emloft.net>, <edumazet@...gle.com>,
        <pisa@....felk.cvut.cz>, <ondrej.ille@...il.com>,
        <wg@...ndegger.com>, <mkl@...gutronix.de>, <pabeni@...hat.com>,
        <linux-can@...r.kernel.org>, <netdev@...r.kernel.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH -next] can: ctucanfd: Use devm_platform_ioremap_resource()

From: Yang Li <yang.lee@...ux.alibaba.com>
Date: Thu, 16 Feb 2023 17:06:10 +0800

> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to Use devm_platform_ioremap_resource(), as this is exactly
> what this function does.
> 
> Signed-off-by: Yang Li <yang.lee@...ux.alibaba.com>

Reviewed-by: Alexander Lobakin <aleksander.lobakin@...el.com>

> ---
>  drivers/net/can/ctucanfd/ctucanfd_platform.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/net/can/ctucanfd/ctucanfd_platform.c b/drivers/net/can/ctucanfd/ctucanfd_platform.c
> index f83684f006ea..a17561d97192 100644
> --- a/drivers/net/can/ctucanfd/ctucanfd_platform.c
> +++ b/drivers/net/can/ctucanfd/ctucanfd_platform.c
> @@ -47,7 +47,6 @@ static void ctucan_platform_set_drvdata(struct device *dev,
>   */
>  static int ctucan_platform_probe(struct platform_device *pdev)
>  {
> -	struct resource *res; /* IO mem resources */
>  	struct device	*dev = &pdev->dev;
>  	void __iomem *addr;
>  	int ret;
> @@ -55,8 +54,7 @@ static int ctucan_platform_probe(struct platform_device *pdev)
>  	int irq;
>  
>  	/* Get the virtual base address for the device */
> -	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	addr = devm_ioremap_resource(dev, res);
> +	addr = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(addr)) {
>  		ret = PTR_ERR(addr);
>  		goto err;
Thanks,
Olek

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ