From: "Niklas Söderlund" <niklas.soderlund@ragnatech.se>
To: Rosen Penev <rosenp@gmail.com>
Cc: netdev@vger.kernel.org, Kurt Kanzenbach <kurt@linutronix.de>,
Andrew Lunn <andrew@lunn.ch>, Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Chris Snook <chris.snook@gmail.com>,
Marcin Wojtas <marcin.s.wojtas@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Heiner Kallweit <hkallweit1@gmail.com>,
Richard Cochran <richardcochran@gmail.com>,
open list <linux-kernel@vger.kernel.org>,
"open list:RENESAS ETHERNET SWITCH DRIVER"
<linux-renesas-soc@vger.kernel.org>
Subject: Re: [PATCHv3 net-next] net: modernize ioremap in probe
Date: Sun, 17 Nov 2024 23:38:50 +0100 [thread overview]
Message-ID: <20241117223850.GK5315@ragnatech.se> (raw)
In-Reply-To: <20241117212711.13612-1-rosenp@gmail.com>
Hello Rosen,
Thanks for your work.
On 2024-11-17 13:27:11 -0800, Rosen Penev wrote:
> diff --git a/drivers/net/ethernet/renesas/rtsn.c
> b/drivers/net/ethernet/renesas/rtsn.c
> index 6b3f7fca8d15..bfe08facc707 100644
> --- a/drivers/net/ethernet/renesas/rtsn.c
> +++ b/drivers/net/ethernet/renesas/rtsn.c
> @@ -1297,14 +1297,8 @@ static int rtsn_probe(struct platform_device *pdev)
> ndev->netdev_ops = &rtsn_netdev_ops;
> ndev->ethtool_ops = &rtsn_ethtool_ops;
>
> - res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "gptp");
> - if (!res) {
> - dev_err(&pdev->dev, "Can't find gptp resource\n");
> - ret = -EINVAL;
> - goto error_free;
> - }
> -
> - priv->ptp_priv->addr = devm_ioremap_resource(&pdev->dev, res);
> + priv->ptp_priv->addr =
> + devm_platform_ioremap_resource_byname(pdev, "gptp");
> if (IS_ERR(priv->ptp_priv->addr)) {
> ret = PTR_ERR(priv->ptp_priv->addr);
> goto error_free;
You have a similar construct using platform_get_resource_byname() a few
lines above this one. Please convert both uses, or none, mixing them is
just confusing IMHO.
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2024-11-17 22:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 21:27 [PATCHv3 net-next] net: modernize ioremap in probe Rosen Penev
2024-11-17 22:38 ` Niklas Söderlund [this message]
2024-11-17 23:07 ` Rosen Penev
2024-11-19 20:39 ` Niklas Söderlund
2024-11-19 23:40 ` Russell King (Oracle)
2024-11-19 20:02 ` Sergey Shtylyov
2024-11-20 19:29 ` Rosen Penev
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=20241117223850.GK5315@ragnatech.se \
--to=niklas.soderlund@ragnatech.se \
--cc=andrew@lunn.ch \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=kurt@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=marcin.s.wojtas@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=rosenp@gmail.com \
--cc=yoshihiro.shimoda.uh@renesas.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).