Linux-Tegra Archive mirror
 help / color / mirror / Atom feed
From: Dipen Patel <dipenp@nvidia.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
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 10:13:15 -0700	[thread overview]
Message-ID: <a698710b-083a-4873-b054-b1426c1237f4@nvidia.com> (raw)
In-Reply-To: <CZR1QZ6F6QA4.2YFL58PNYHE0P@gmail.com>

On 3/11/24 9:04 AM, Thierry Reding wrote:
> 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>
Do you want me to take this patch or want to add in your patch series
for the drivers with similar changes?

Acked-by: Dipen Patel <dipenp@nvidia.com>

  reply	other threads:[~2024-03-11 17:13 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
2024-03-11 17:13   ` Dipen Patel [this message]
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=a698710b-083a-4873-b054-b1426c1237f4@nvidia.com \
    --to=dipenp@nvidia.com \
    --cc=jonathanh@nvidia.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-tegra@vger.kernel.org \
    --cc=thierry.reding@gmail.com \
    --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).