public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Tzung-Bi Shih <tzungbi@kernel.org>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: MyungJoo Ham <myungjoo.ham@samsung.com>,
	Chanwoo Choi <cw00.choi@samsung.com>,
	Benson Leung <bleung@chromium.org>,
	Guenter Roeck <groeck@chromium.org>,
	linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev
Subject: Re: [PATCH 7/7] extcon: usbc-cros-ec: Convert to platform remove callback returning void
Date: Mon, 26 Feb 2024 13:48:20 +0800	[thread overview]
Message-ID: <ZdwmJNGLJgAa5Z45@google.com> (raw)
In-Reply-To: <52d0a4317d5372f1135259d4fbbd2822b86ba8f4.1708876186.git.u.kleine-koenig@pengutronix.de>

On Sun, Feb 25, 2024 at 04:54:56PM +0100, 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>

Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>

  reply	other threads:[~2024-02-26  5:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20240225161430epcas1p371a4ee6a088b0121092af5064d56bc16@epcas1p3.samsung.com>
2024-02-25 15:54 ` [PATCH 0/7] extcon: Convert to platform remove callback returning void Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 1/7] extcon: adc-jack: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 2/7] extcon: intel-cht-wc: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 3/7] extcon: intel-mrfld: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 4/7] extcon: max3355: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 5/7] extcon: max77843: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 6/7] extcon: usb-gpio: " Uwe Kleine-König
2024-02-25 15:54   ` [PATCH 7/7] extcon: usbc-cros-ec: " Uwe Kleine-König
2024-02-26  5:48     ` Tzung-Bi Shih [this message]
2024-03-07 11:34   ` [PATCH 0/7] extcon: " Chanwoo Choi

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=ZdwmJNGLJgAa5Z45@google.com \
    --to=tzungbi@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=cw00.choi@samsung.com \
    --cc=groeck@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    --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