Re: [PATCH 4/4] iio: pressure: Add triggered buffer support for BMP280 driver

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

 



On Mon, Mar 04, 2024 at 09:18:27PM +0200, Andy Shevchenko wrote:
> On Mon, Mar 04, 2024 at 08:08:38PM +0100, Vasileios Amoiridis wrote:
> > On Mon, Mar 04, 2024 at 01:52:05PM +0200, Andy Shevchenko wrote:
> > > On Sun, Mar 03, 2024 at 05:53:00PM +0100, Vasileios Amoiridis wrote:
> 
> ...
> 
> > > > +	struct {
> > > > +		s32 temperature;
> > > > +		u32 pressure;
> > > > +		u32 humidity;
> > > 
> > > > +		s64 timestamp;
> > > 
> > > Shouldn't this be aligned properly?
> > 
> > I saw that in some drivers it was added and in some it was not. What is the
> > difference of aligning just the timestamp of the kernel?
> 
> You can count yourself. With provided structure as above there is a high
> probability of misaligned timeout field. The latter has to be aligned on
> 8 bytes.
> 

I was unaware, but now I am not. Thank you very much for the feedback.
> > > > +	} iio_buffer;
> 
> -- 
> 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