[PATCH v2 2/3] iio: imu: st_lsm6dsx: Use aligned data type for timestamp

Andy Shevchenko posted 3 patches 1 year, 3 months ago
[PATCH v2 2/3] iio: imu: st_lsm6dsx: Use aligned data type for timestamp
Posted by Andy Shevchenko 1 year, 3 months ago
Use __aligned_s64 for the timestamp field.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
index a3b93566533b..d5e2771042bd 100644
--- a/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
+++ b/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.h
@@ -444,10 +444,9 @@ struct st_lsm6dsx_hw {
 	const struct st_lsm6dsx_settings *settings;
 
 	struct iio_mount_matrix orientation;
-	/* Ensure natural alignment of buffer elements */
 	struct {
 		__le16 channels[3];
-		s64 ts __aligned(8);
+		aligned_s64 ts;
 	} scan[ST_LSM6DSX_ID_MAX];
 };
 
-- 
2.43.0.rc1.1336.g36b5255a03ac
Re: [PATCH v2 2/3] iio: imu: st_lsm6dsx: Use aligned data type for timestamp
Posted by Andy Shevchenko 1 year, 3 months ago
On Tue, Sep 03, 2024 at 08:59:05PM +0300, Andy Shevchenko wrote:
> Use __aligned_s64 for the timestamp field.

Oh, heck. I forgot to change the commit message...

...

> -	/* Ensure natural alignment of buffer elements */

...and for some reason this haven't been updated to be not removed.

I have updated locally, but will wait for other comments, maybe it's the only
problem and Jonathan can fix whilst applying.

-- 
With Best Regards,
Andy Shevchenko