[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <da671768-64b8-e658-20bb-c536df8c1aae@huawei.com>
Date: Mon, 7 Jun 2021 09:05:08 +0800
From: Yang Yingliang <yangyingliang@...wei.com>
To: Linus Walleij <linus.walleij@...aro.org>
CC: linux-kernel <linux-kernel@...r.kernel.org>,
netdev <netdev@...r.kernel.org>,
Hans Ulli Kroll <ulli.kroll@...glemail.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>
Subject: Re: [PATCH net-next v2] net: gemini: Use
devm_platform_get_and_ioremap_resource()
Hi,
On 2021/6/5 23:17, Linus Walleij wrote:
> On Sat, Jun 5, 2021 at 2:32 PM Yang Yingliang <yangyingliang@...wei.com> wrote:
>
>> Use devm_platform_get_and_ioremap_resource() to simplify
>> code.
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@...wei.com>
> (...)
>> - 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.
They are used to print message before returning gemini_ethernet_port_probe()
static int gemini_ethernet_port_probe(struct platform_device *pdev)
{
[...]
netdev_info(netdev,
"irq %d, DMA @ 0x%pap, GMAC @ 0x%pap\n",
port->irq, &dmares->start,
&gmacres->start);
return 0;
unprepare:
clk_disable_unprepare(port->pclk);
return ret;
}
Thanks,
Yang
>
> Yours,
> Linus Walleij
> .
Powered by blists - more mailing lists