From: "Thierry Reding" <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Dipen Patel" <dipenp@nvidia.com>
Cc: "Jonathan Hunter" <jonathanh@nvidia.com>,
<timestamp@lists.linux.dev>, <linux-tegra@vger.kernel.org>,
<kernel@pengutronix.de>
Subject: Re: [PATCH] hte: tegra-194: Convert to platform remove callback returning void
Date: Mon, 11 Mar 2024 17:04:05 +0100 [thread overview]
Message-ID: <CZR1QZ6F6QA4.2YFL58PNYHE0P@gmail.com> (raw)
In-Reply-To: <0b0a5d3816973ee88d4be9fe9f2349065a42cbff.1709886922.git.u.kleine-koenig@pengutronix.de>
[-- Attachment #1: Type: text/plain, Size: 987 bytes --]
On Fri Mar 8, 2024 at 9:51 AM CET, Uwe Kleine-König wrote:
> The .remove() callback for a platform driver returns an int which makes
> many driver authors wrongly assume it's possible to do error handling by
> returning an error code. However the value returned is ignored (apart
> from emitting a warning) and this typically results in resource leaks.
>
> To improve here there is a quest to make the remove callback return
> void. In the first step of this quest all drivers are converted to
> .remove_new(), which already returns void. Eventually after all drivers
> are converted, .remove_new() will be renamed to .remove().
>
> Trivially convert this driver from always returning zero in the remove
> callback to the void returning variant.
>
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> drivers/hte/hte-tegra194-test.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2024-03-11 16:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-08 8:51 [PATCH] hte: tegra-194: Convert to platform remove callback returning void Uwe Kleine-König
2024-03-11 16:04 ` Thierry Reding [this message]
2024-03-11 17:13 ` Dipen Patel
2024-03-11 20:36 ` Uwe Kleine-König
2024-04-12 12:35 ` Uwe Kleine-König
2024-04-12 17:49 ` Dipen Patel
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=CZR1QZ6F6QA4.2YFL58PNYHE0P@gmail.com \
--to=thierry.reding@gmail.com \
--cc=dipenp@nvidia.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@pengutronix.de \
--cc=linux-tegra@vger.kernel.org \
--cc=timestamp@lists.linux.dev \
--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 read-only IMAP folder(s) and NNTP newsgroup(s).