From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Neil Armstrong <neil.armstrong@linaro.org>,
linux-pwm@vger.kernel.org,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
Kevin Hilman <khilman@baylibre.com>,
kernel@pengutronix.de, linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Jerome Brunet <jbrunet@baylibre.com>
Subject: Re: [PATCH] pwm: meson: Simplify using dev_err_probe()
Date: Mon, 11 Dec 2023 12:01:33 +0100 [thread overview]
Message-ID: <ZXbsDRslZNKCeJF9@orome.fritz.box> (raw)
In-Reply-To: <20231208190620.5qobgtyii2wt7tfa@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1864 bytes --]
On Fri, Dec 08, 2023 at 08:06:20PM +0100, Uwe Kleine-König wrote:
> Hello Thierry,
>
> On Fri, Dec 08, 2023 at 04:52:57PM +0100, Thierry Reding wrote:
> > This is a lot of churn for very little gain.
>
> We seem to have different conceptions of churn. Each hunk here is an
> improvement for both SLOC count and usefulness of the generated error
> message.
>
> failed to register somename: -5
>
> is worse than
>
> error EIO: failed to register somename
>
> , isn't it?
That's entirely subjective. I think the first version is just fine. I,
and I suspect most developers will, know what to do with either of those
error messages.
> > None of these functions are ever going to return -EPROBE_DEFER. And
> > yes, I know that function's doc says that it is "deemed acceptable to
> > use" elsewhere. However, the existing error messages are just fine, no
> > need to churn just for the sake of it.
>
> We had this disagreement already before. Yes dev_err_probe() is useful
> for three reasons and this driver only benefits from two of these.
> That's IMHO still one reason more than needed to justify such a change.
I disagree. There are certainly cases where dev_err_probe() can be a
significant improvement, but there are others where the improvement is
very minor (if there's any at all) and in my opinion the churn isn't
justified. Otherwise we'll just forever keep rewriting the same code
over and over again because somebody comes up with yet another variant
of mostly the same code.
> And if you think that a function should only be used if all advantages
> are useful for the caller, let us reconsider if we really need capture
> support in the pwm framework as only two of the 68 drivers make use of
> it.
That's a ridiculous argument and you know it. You are comparing apples
to oranges.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2023-12-11 11:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-06 21:48 [PATCH] pwm: meson: Simplify using dev_err_probe() Uwe Kleine-König
2023-12-08 15:52 ` Thierry Reding
2023-12-08 19:06 ` Uwe Kleine-König
2023-12-11 11:01 ` Thierry Reding [this message]
2023-12-11 14:19 ` Uwe Kleine-König
2023-12-11 15:24 ` Thierry Reding
2023-12-11 16:44 ` Uwe Kleine-König
2023-12-12 20:33 ` Uwe Kleine-König
2023-12-20 15:59 ` Thierry Reding
2023-12-21 9:21 ` [PATCH] MAINTAINERS: pwm: Thierry steps down, Uwe takes over Uwe Kleine-König
2023-12-21 9:23 ` Neil Armstrong
2023-12-21 9:57 ` Thierry Reding
2023-12-21 11:17 ` Uwe Kleine-König
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=ZXbsDRslZNKCeJF9@orome.fritz.box \
--to=thierry.reding@gmail.com \
--cc=jbrunet@baylibre.com \
--cc=kernel@pengutronix.de \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-pwm@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=neil.armstrong@linaro.org \
--cc=u.kleine-koenig@pengutronix.de \
/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).