lkml.org 
[lkml]   [2023]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 2/2] leds: add ktd202x driver
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/ |
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2023-10-01 19:06    [W:1.360 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site