From: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
To: "André Apitzsch" <git@apitzsch.eu>
Cc: Christophe JAILLET <christophe.jaillet@wanadoo.fr>,
conor+dt@kernel.org, devicetree@vger.kernel.org,
krzysztof.kozlowski+dt@linaro.org, lee@kernel.org,
linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
pavel@ucw.cz, phone-devel@vger.kernel.org, robh+dt@kernel.org,
~postmarketos/upstreaming@lists.sr.ht
Subject: Re: [PATCH v5 2/2] leds: add ktd202x driver
Date: Sun, 1 Oct 2023 19:05:40 +0200 [thread overview]
Message-ID: <20231001170540.yiouho2lrzrioxns@pengutronix.de> (raw)
In-Reply-To: <250d0e681e7bbb750464338fb3a1a4a3199ce6ef.camel@apitzsch.eu>
[-- Attachment #1: Type: text/plain, Size: 799 bytes --]
Hello André,
On Sun, Oct 01, 2023 at 06:56:20PM +0200, André Apitzsch wrote:
> Am Sonntag, dem 01.10.2023 um 17:15 +0200 schrieb Christophe JAILLET:
> > Le 01/10/2023 à 15:52, André Apitzsch a écrit :
> > > + for_each_available_child_of_node(np, child) {
> > > + u32 mono_color = 0;
> >
> > Un-needed init.
> > And, why is it defined here, while reg is defined out-side the loop?
>
> I'll move it out-side the loop (without initialization).
In my book a variable with a narrow scope is better. I didn't check, but
if you can restrict both variables to the for loop, that's nicer.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | https://www.pengutronix.de/ |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-10-01 17:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-01 13:52 [PATCH v5 0/2] leds: Add a driver for KTD202x André Apitzsch
2023-10-01 13:52 ` [PATCH v5 1/2] dt-bindings: leds: Add Kinetic KTD2026/2027 LED André Apitzsch
2023-10-01 13:52 ` [PATCH v5 2/2] leds: add ktd202x driver André Apitzsch
2023-10-01 15:15 ` Christophe JAILLET
2023-10-01 16:56 ` André Apitzsch
2023-10-01 17:05 ` Uwe Kleine-König [this message]
2023-10-01 20:46 ` Christophe JAILLET
2023-10-02 6:09 ` André Apitzsch
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=20231001170540.yiouho2lrzrioxns@pengutronix.de \
--to=u.kleine-koenig@pengutronix.de \
--cc=christophe.jaillet@wanadoo.fr \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=git@apitzsch.eu \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=phone-devel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=~postmarketos/upstreaming@lists.sr.ht \
/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).