[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZnAHsRn3N4mwPL7q@duo.ucw.cz>
Date: Mon, 17 Jun 2024 11:53:53 +0200
From: Pavel Machek <pavel@....cz>
To: Markus Elfring <Markus.Elfring@....de>
Cc: André Apitzsch <git@...tzsch.eu>,
linux-leds@...r.kernel.org, phone-devel@...r.kernel.org,
devicetree@...r.kernel.org, linux-arm-msm@...r.kernel.org,
~postmarketos/upstreaming@...ts.sr.ht,
Bjorn Andersson <andersson@...nel.org>,
Christophe Jaillet <christophe.jaillet@...adoo.fr>,
Conor Dooley <conor+dt@...nel.org>,
"Gustavo A. R. Silva" <gustavoars@...nel.org>,
Kees Cook <kees@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>,
Lee Jones <lee@...nel.org>, Trilok Soni <quic_tsoni@...cinc.com>,
LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 2/3] leds: sy7802: Add support for Silergy SY7802
flash LED controller
On Sun 2024-06-16 20:55:41, Markus Elfring wrote:
> > The SY7802 is a current-regulated charge pump which can regulate two
> > current levels for Flash and Torch modes.
> >
> > It is a high-current synchronous boost converter with 2-channel high
> > side current sources. Each channel is able to deliver 900mA current.
>
> Would you like to improve such a change description with imperative wordings?
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/submitting-patches.rst?h=v6.10-rc3#n94
>
Feel free to ignore this.
> …
> > +++ b/drivers/leds/flash/leds-sy7802.c
> > @@ -0,0 +1,542 @@
> …
> > +static int sy7802_strobe_get(struct led_classdev_flash *fl_cdev, bool *state)
> > +{
> …
> > + mutex_lock(&chip->mutex);
> > + *state = !!(chip->fled_strobe_used & BIT(led->led_id));
> > + mutex_unlock(&chip->mutex);
> > +
> > + return 0;
> > +}
> …
>
> Would you become interested to apply a statement like “guard(mutex)(&chip->mutex);”?
> https://elixir.bootlin.com/linux/v6.10-rc3/source/include/linux/mutex.h#L196
This does not look like real improvement for code this trivial.
BR,
Pavel
--
People of Russia, stop Putin before his war on Ukraine escalates.
Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)
Powered by blists - more mailing lists