Re: [PATCH v1 3/3] iio: hid-sensor: Use aligned data type for timestamp

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

 



On Mon, Aug 28, 2023 at 05:09:28PM +0100, Jonathan Cameron wrote:
> On Tue, 15 Aug 2023 18:40:27 +0300
> Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:

...

> > -	/* Ensure timestamp is naturally aligned */
> 
> Comment is still true and no more or less obvious than it was with the old code
> I think so I don't really see why it should be removed with this change.

Doesn't the prefix "aligned" make this comment somehow redundant?

> >  	struct {
> >  		u32 accel_val[3];
> > -		s64 timestamp __aligned(8);
> > +		aligned_s64 timestamp;
> >  	} scan;

...

> > -		s32 sampled_vals[4] __aligned(16);
> > +		s32 sampled_vals[4];
> 
> Hmm. I can't immediately recall why that aligned(16) is therebut
> it's not related to the rest of this change so I'm not sure we should touch
> it. I don't think we ever required quaternions to be aligned as a whole so
> this does feel odd but in the category of something we should be careful
> touching or at very least do it in a different patch where it stands out.

I have checked the code and find nothing that justifies this, I can split it
to a separate patch, though.

Note, among ISH HID drivers it's the only one with a such...

> > +		aligned_s64 timestamp;
> >  	} scan;


-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux