Re: [PATCH v3 19/27] iio:pressure:mpl3115 Force alignment of buffer

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

 



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



[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