From: Neil Armstrong <narmstrong@baylibre.com>
To: YueHaibing <yuehaibing@huawei.com>,
davem@davemloft.net, peppe.cavallaro@st.com,
alexandre.torgue@st.com, joabreu@synopsys.com,
khilman@baylibre.com, mcoquelin.stm32@gmail.com
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-amlogic@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next] net: stmmac: dwmac-meson8b: use devm_platform_ioremap_resource() to simplify code
Date: Wed, 21 Aug 2019 16:03:22 +0200 [thread overview]
Message-ID: <0405cd33-9bbc-b2db-d066-2934b76c5dc2@baylibre.com> (raw)
In-Reply-To: <20190821135130.68636-1-yuehaibing@huawei.com>
On 21/08/2019 15:51, YueHaibing wrote:
> Use devm_platform_ioremap_resource() to simplify the code a bit.
> This is detected by coccinelle.
>
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> index 786ca4a..9cda29e 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c
> @@ -308,7 +308,6 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
> {
> struct plat_stmmacenet_data *plat_dat;
> struct stmmac_resources stmmac_res;
> - struct resource *res;
> struct meson8b_dwmac *dwmac;
> int ret;
>
> @@ -332,8 +331,7 @@ static int meson8b_dwmac_probe(struct platform_device *pdev)
> ret = -EINVAL;
> goto err_remove_config_dt;
> }
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
> - dwmac->regs = devm_ioremap_resource(&pdev->dev, res);
> + dwmac->regs = devm_platform_ioremap_resource(pdev, 1);
> if (IS_ERR(dwmac->regs)) {
> ret = PTR_ERR(dwmac->regs);
> goto err_remove_config_dt;
>
Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
next prev parent reply other threads:[~2019-08-21 14:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-21 13:51 [PATCH net-next] net: stmmac: dwmac-meson8b: use devm_platform_ioremap_resource() to simplify code YueHaibing
2019-08-21 14:03 ` Neil Armstrong [this message]
2019-08-21 20:53 ` David Miller
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=0405cd33-9bbc-b2db-d066-2934b76c5dc2@baylibre.com \
--to=narmstrong@baylibre.com \
--cc=alexandre.torgue@st.com \
--cc=davem@davemloft.net \
--cc=joabreu@synopsys.com \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=yuehaibing@huawei.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;
as well as URLs for NNTP newsgroup(s).