[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210712060940.785119440@linuxfoundation.org>
Date: Mon, 12 Jul 2021 08:10:24 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Sasha Levin <sashal@...nel.org>
Subject: [PATCH 5.10 464/593] iio: chemical: atlas: Fix buffer alignment in iio_push_to_buffers_with_timestamp()
From: Jonathan Cameron <Jonathan.Cameron@...wei.com>
[ Upstream commit b0f5d8db7348a6ce5cdd79fba46ebc91eebc8fd9 ]
Variable location for the timestamp, so just use __aligned(8)
to ensure it is always possible to naturally align it.
Found during an audit of all calls of uses of
iio_push_to_buffers_with_timestamp()
Fixes tag is not accurate, but it will need manual backporting beyond
that point if anyone cares.
Fixes: 0d15190f53b4 ("iio: chemical: atlas-ph-sensor: rename atlas-ph-sensor to atlas-sensor")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@...wei.com>
Cc: Matt Ranostay <matt.ranostay@...sulko.com>
Acked-by: Matt Ranostay <matt.ranostay@...sulko.com>
Link: https://lore.kernel.org/r/20210501171352.512953-6-jic23@kernel.org
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/iio/chemical/atlas-sensor.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/iio/chemical/atlas-sensor.c b/drivers/iio/chemical/atlas-sensor.c
index cdab9d04dedd..0c8a50de8940 100644
--- a/drivers/iio/chemical/atlas-sensor.c
+++ b/drivers/iio/chemical/atlas-sensor.c
@@ -91,8 +91,8 @@ struct atlas_data {
struct regmap *regmap;
struct irq_work work;
unsigned int interrupt_enabled;
-
- __be32 buffer[6]; /* 96-bit data + 32-bit pad + 64-bit timestamp */
+ /* 96-bit data + 32-bit pad + 64-bit timestamp */
+ __be32 buffer[6] __aligned(8);
};
static const struct regmap_config atlas_regmap_config = {
--
2.30.2
Powered by blists - more mailing lists