Re: [PATCH v2 04/11] iio: adc: ad_sigma_delta: use BITS_TO_BYTES() macro

From: Andy Shevchenko
Date: Mon Jun 30 2025 - 05:00:24 EST


On Sat, Jun 28, 2025 at 03:56:43PM +0100, Jonathan Cameron wrote:
> On Fri, 27 Jun 2025 18:40:00 -0500
> David Lechner <dlechner@xxxxxxxxxxxx> wrote:

...

> > - samples_buf_size = ALIGN(slot * indio_dev->channels[0].scan_type.storagebits / 8, 8);
> > + samples_buf_size = ALIGN(slot * BITS_TO_BYTES(scan_type->storagebits), 8);
>
> Ah. You do it here. Fair enough and no problem wrt to patch 1 then.

Hmm... Should the second 8 be something like sizeof(unsigned long lone) for
semantic distinguishing with 8-bit bytes?

--
With Best Regards,
Andy Shevchenko