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: <9e2c68af-637b-daff-5793-2d537c188998@microchip.com>
Date:   Mon, 7 Jun 2021 16:05:03 +0200
From:   Nicolas Ferre <nicolas.ferre@...rochip.com>
To:     Yang Yingliang <yangyingliang@...wei.com>,
        <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
CC:     <davem@...emloft.net>, <kuba@...nel.org>
Subject: Re: [PATCH net-next] net: macb: Use
 devm_platform_get_and_ioremap_resource()

On 07/06/2021 at 15:43, Yang Yingliang wrote:
> Use devm_platform_get_and_ioremap_resource() to simplify
> code.
> 
> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>

Acked-by: Nicolas Ferre <nicolas.ferre@...rochip.com>

> ---
>   drivers/net/ethernet/cadence/macb_main.c | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
> index a0c7b1167dbb..7d2fe13a52f8 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -4655,8 +4655,7 @@ static int macb_probe(struct platform_device *pdev)
>          struct macb *bp;
>          int err, val;
> 
> -       regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -       mem = devm_ioremap_resource(&pdev->dev, regs);
> +       mem = devm_platform_get_and_ioremap_resource(pdev, 0, &regs);
>          if (IS_ERR(mem))
>                  return PTR_ERR(mem);
> 
> --
> 2.25.1
> 


-- 
Nicolas Ferre

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ