Thread (9 messages) 9 messages, 2 authors, 2023-08-29

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

flat view

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2023-08-29 13:23:21
Also in: linux-iio, lkml

On Mon, Aug 28, 2023 at 05:09:28PM +0100, Jonathan Cameron wrote:
On Tue, 15 Aug 2023 18:40:27 +0300
Andy Shevchenko [off-list ref] wrote:
...
quoted
-	/* 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?
quoted
 	struct {
 		u32 accel_val[3];
-		s64 timestamp __aligned(8);
+		aligned_s64 timestamp;
 	} scan;
...
quoted
-		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...
quoted
+		aligned_s64 timestamp;
 	} scan;

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help