lkml.org 
[lkml]   [2024]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 4/4] iio: pressure: Add triggered buffer support for BMP280 driver
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.

> > > + } iio_buffer;

--
With Best Regards,
Andy Shevchenko



\
 
 \ /
  Last update: 2024-05-27 15:34    [W:0.049 / U:2.704 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site