Re: [PATCH 1/3] iio: adc: add max11410 adc driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jul 4, 2022 at 11:46 PM Andy Shevchenko
<andy.shevchenko@xxxxxxxxx> wrote:
> On Mon, Jul 4, 2022 at 12:58 PM Ibrahim Tilki <Ibrahim.Tilki@xxxxxxxxxx> wrote:

...

> > +       for_each_set_bit(i, scan_mask, indio_dev->num_channels) {
> > +               ++enabled_channels;
>
> x++ will suffice
>
> > +       }
>
> {} are not needed.

Dunno, what I was thinking of, but this entire snipped is NIH
bitmap_weight() / hweight_long()

-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux