From: Andrew Lunn <andrew@lunn.ch>
To: "Russell King (Oracle)" <linux@armlinux.org.uk>
Cc: "Rosen Penev" <rosenp@gmail.com>,
netdev@vger.kernel.org, "Kurt Kanzenbach" <kurt@linutronix.de>,
"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>,
"Yoshihiro Shimoda" <yoshihiro.shimoda.uh@renesas.com>,
"Niklas Söderlund" <niklas.soderlund@ragnatech.se>,
"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: [PATCHv4 net-next] net: modernize ioremap in probe
Date: Wed, 4 Dec 2024 00:43:13 +0100 [thread overview]
Message-ID: <09215f37-883b-4627-8f37-04a2a5ef8ae2@lunn.ch> (raw)
In-Reply-To: <Z0-LgWETqKZe2uyV@shell.armlinux.org.uk>
> This is not equivalent. This means if ioremap() fails inside
> devm_platform_ioremap_resource(), we end up printing a message that
> blames the firmware, which is wrong.
>
> It also changes a "resource missing, proceed anyway" situation into
> a failure situation.
>
> Please drop this change, "cleaning" this up is introducing bugs.
https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html
says:
1.6.5. Using device-managed and cleanup.h constructs
Netdev remains skeptical about promises of all “auto-cleanup” APIs,
including even devm_ helpers, historically. They are not the
preferred style of implementation, merely an acceptable one.
1.6.6. Clean-up patches
Netdev discourages patches which perform simple clean-ups, which are
not in the context of other work. For example:
Addressing checkpatch.pl warnings
Addressing Local variable ordering issues
Conversions to device-managed APIs (devm_ helpers)
This is because it is felt that the churn that such changes produce
comes at a greater cost than the value of such clean-ups.
As Russell points out, you are breaking things which probably worked
before. "If its not broken, don't fix it". These changes cost reviewer
time trying to find what you have broken, when it would be better
spent other places.
If you have the hardware, and wont to work on the driver to add new
features, then yes, you can do this sort of conversion, because you
should find your own bugs via testing. If you don't have the hardware,
please just leave it alone.
Andrew
next prev parent reply other threads:[~2024-12-03 23:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-03 22:27 Rosen Penev
2024-12-03 22:51 ` Russell King (Oracle)
2024-12-03 23:43 ` Andrew Lunn [this message]
2024-12-04 1:30 ` Jakub Kicinski
2024-12-05 1:06 ` 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=09215f37-883b-4627-8f37-04a2a5ef8ae2@lunn.ch \
--to=andrew@lunn.ch \
--cc=chris.snook@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.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=niklas.soderlund@ragnatech.se \
--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
all inboxes | Powered by JetHome®