From: Yang Yingliang <yangyingliang@huawei.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
netdev <netdev@vger.kernel.org>,
Hans Ulli Kroll <ulli.kroll@googlemail.com>,
"David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Subject: Re: [PATCH net-next v2] net: gemini: Use devm_platform_get_and_ioremap_resource()
Date: Mon, 7 Jun 2021 09:05:08 +0800 [thread overview]
Message-ID: <da671768-64b8-e658-20bb-c536df8c1aae@huawei.com> (raw)
In-Reply-To: <CACRpkdZi-W-vnCH05C4CkQdnYtUKuD4NWoBTh8hGXmok_=Dsfw@mail.gmail.com>
Hi,
On 2021/6/5 23:17, Linus Walleij wrote:
> On Sat, Jun 5, 2021 at 2:32 PM Yang Yingliang <yangyingliang@huawei.com> wrote:
>
>> Use devm_platform_get_and_ioremap_resource() to simplify
>> code.
>>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.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
> .
next prev parent reply other threads:[~2021-06-07 1:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-05 12:36 Yang Yingliang
2021-06-05 15:17 ` Linus Walleij
2021-06-07 1:05 ` Yang Yingliang [this message]
2021-06-07 6:49 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da671768-64b8-e658-20bb-c536df8c1aae@huawei.com \
--to=yangyingliang@huawei.com \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=ulli.kroll@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®