Re: [PATCH net-next v2] net: gemini: Use devm_platform_get_and_ioremap_resource()

From: Linus Walleij
Date: Sat Jun 05 2021 - 11:19:01 EST


On Sat, Jun 5, 2021 at 2:32 PM Yang Yingliang <yangyingliang@xxxxxxxxxx> wrote:

> Use devm_platform_get_and_ioremap_resource() to simplify
> code.
>
> Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
(...)
> - dmares = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - gmacres = platform_get_resource(pdev, IORESOURCE_MEM, 1);

Should you not also delete the local variables
dmares and gmacres? I doubt they are used
after this.

Yours,
Linus Walleij