On Wed, Jul 22, 2020 at 6:53 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote: > This one is unusual. We have to do an explicit memset each time > as we are reading 3 bytes into a potential 4 byte channel which > may sometimes be a 2 byte channel depending on what is enabled. > As such, moving the buffer to the heap in the iio_priv structure > doesn't save us much. We can't use a nice explicit structure > on the stack either as the data channels have different storage > sizes and are all separately controlled. I guess all non-standard cases (where no struct is applicable) deserve for better comment in the code. -- With Best Regards, Andy Shevchenko