On Wed, Jun 10, 2026 at 05:45:28PM +0300, Svyatoslav Ryhel wrote:
> вт, 9 черв. 2026 р. о 22:23 Andy Shevchenko <[email protected]>
> пише:
> > On Sat, Jun 06, 2026 at 07:57:38AM +0300, Svyatoslav Ryhel wrote:
> > > Add Control Bank to HVLED/LVLED muxing support based on the led-sources
> > > defined in the device tree.
...
> > > + int ret, i;
> >
> > No need to add 'i'.
>
> This is personal preference as well. There is no strict rule that
> iteration variable must be defined strictly in the for loop.
This is a preference by Linus who is the leader of the project.
Also in IIO we have some set of maintainer preferences.
> > > + for (i = 0; i < led->num_leds; i++) {
> >
> > for (unsigned int i = 0; i < led->num_leds; i++) {
> >
> > > + if (led->leds[i] >= LM3533_LVCTRLBANK_MAX)
> > > + continue;
> > > +
> > > + output_cfg_shift = led->leds[i] * 2;
> > > + output_cfg_val |= led->id << output_cfg_shift;
> > > + output_cfg_mask |= OUTPUT_LVLED_MASK <<
> > > output_cfg_shift;
> > > + }
--
With Best Regards,
Andy Shevchenko