linux-pwm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Lee Jones <lee.jones@linaro.org>, Shawn Guo <shawnguo@kernel.org>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	Fabio Estevam <festevam@gmail.com>,
	NXP Linux Team <linux-imx@nxp.com>,
	linux-pwm@vger.kernel.org
Subject: Re: [PATCH 2/2] pwm: imx27: Don't check the return code of pwmchip_remove()
Date: Fri, 9 Apr 2021 14:00:20 +0200	[thread overview]
Message-ID: <YHBB1HrlQ/DMiey7@orome.fritz.box> (raw)
In-Reply-To: <20210324152058.69022-3-u.kleine-koenig@pengutronix.de>

[-- Attachment #1: Type: text/plain, Size: 866 bytes --]

On Wed, Mar 24, 2021 at 04:20:58PM +0100, Uwe Kleine-König wrote:
> pwmchip_remove() always returns 0. Don't use the value to make it
> possible to eventually change the function to return void. This is a
> good thing as pwmchip_remove() is usually called from a remove function
> (mostly for platform devices) and their return value is ignored by the
> device core anyhow.
> 
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
>  drivers/pwm/pwm-imx27.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)

It's true that there's not much we can do upon failure, so failing
doesn't make much sense and therefore returning an error doesn't make
sense. So how about we WARN on the -EBUSY case instead of returning an
error? That should have an even higher impact than an error that's being
silently ignored.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-04-09 11:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-24 15:20 [PATCH 0/2] Changes for pwmchip_remove() Uwe Kleine-König
2021-03-24 15:20 ` [PATCH 1/2] pwm: Drop unused error path from pwmchip_remove() Uwe Kleine-König
2021-04-09 11:57   ` Thierry Reding
2021-04-10 21:56     ` Uwe Kleine-König
2021-03-24 15:20 ` [PATCH 2/2] pwm: imx27: Don't check the return code of pwmchip_remove() Uwe Kleine-König
2021-04-09 12:00   ` Thierry Reding [this message]
2021-05-25 19:59     ` Uwe Kleine-König
2021-07-05 13:15       ` 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=YHBB1HrlQ/DMiey7@orome.fritz.box \
    --to=thierry.reding@gmail.com \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=lee.jones@linaro.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-pwm@vger.kernel.org \
    --cc=shawnguo@kernel.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).