All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: Pavel Machek <pavel@ucw.cz>,
	Linux LED Subsystem <linux-leds@vger.kernel.org>,
	Sascha Hauer <kernel@pengutronix.de>
Subject: Re: [PATCH] leds: lm3692x: Return 0 from remove callback
Date: Mon, 7 Feb 2022 17:23:40 +0200	[thread overview]
Message-ID: <CAHp75VdHjN94JXsfdF+K-zG2RL_mtZov3aB+4wdQKO8BRKBhgQ@mail.gmail.com> (raw)
In-Reply-To: <20220206220812.21471-1-u.kleine-koenig@pengutronix.de>

On Mon, Feb 7, 2022 at 5:08 PM Uwe Kleine-König
<u.kleine-koenig@pengutronix.de> wrote:
>
> The only difference between returning zero or a non-zero value is that
> for the non-zero case the i2c will print a generic error message
> ("remove failed (-ESOMETHING), will be ignored").
>
> In this case however the driver itself already emitted a more helpful
> error message, so the additional error message isn't helpful at all.
>
> The long-term goal is to make the i2c remove callback return void, making
> all implementations return 0 is preparatory work for this change.

...

> +       lm3692x_leds_disable(led);

Since it emits a message, perhaps converting it to void also can be
done here. Otherwise what's the point to have it int?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2022-02-07 15:39 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-06 22:08 [PATCH] leds: lm3692x: Return 0 from remove callback Uwe Kleine-König
2022-02-07 15:23 ` Andy Shevchenko [this message]
2022-02-08  8:45   ` Uwe Kleine-König
2022-02-12 12:03 ` Pavel Machek

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=CAHp75VdHjN94JXsfdF+K-zG2RL_mtZov3aB+4wdQKO8BRKBhgQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.