[PATCH 8/8] iio: pressure: mprls0025pa: use aligned_s64 for timestamp

David Lechner posted 8 patches 9 months, 3 weeks ago
There is a newer version of this series
[PATCH 8/8] iio: pressure: mprls0025pa: use aligned_s64 for timestamp
Posted by David Lechner 9 months, 3 weeks ago
Follow the pattern of other drivers and use aligned_s64 for the
timestamp. This will ensure the struct itself it also 8-byte aligned.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
 drivers/iio/pressure/mprls0025pa.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/iio/pressure/mprls0025pa.h b/drivers/iio/pressure/mprls0025pa.h
index 9d5c30afa9d69a6a606662aa7906a76347329cef..9fe9eb35e79d992b2a576e5d0af71113c6c47400 100644
--- a/drivers/iio/pressure/mprls0025pa.h
+++ b/drivers/iio/pressure/mprls0025pa.h
@@ -41,7 +41,7 @@ struct mpr_ops;
  */
 struct mpr_chan {
 	s32 pres;
-	s64 ts;
+	aligned_s64 ts;
 };
 
 enum mpr_func_id {

-- 
2.43.0
Re: [PATCH 8/8] iio: pressure: mprls0025pa: use aligned_s64 for timestamp
Posted by Nuno Sá 9 months, 3 weeks ago
On Thu, 2025-04-17 at 11:52 -0500, David Lechner wrote:
> Follow the pattern of other drivers and use aligned_s64 for the
> timestamp. This will ensure the struct itself it also 8-byte aligned.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---

ditto

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

>  drivers/iio/pressure/mprls0025pa.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/pressure/mprls0025pa.h
> b/drivers/iio/pressure/mprls0025pa.h
> index
> 9d5c30afa9d69a6a606662aa7906a76347329cef..9fe9eb35e79d992b2a576e5d0af71113c6c47400
> 100644
> --- a/drivers/iio/pressure/mprls0025pa.h
> +++ b/drivers/iio/pressure/mprls0025pa.h
> @@ -41,7 +41,7 @@ struct mpr_ops;
>   */
>  struct mpr_chan {
>  	s32 pres;
> -	s64 ts;
> +	aligned_s64 ts;
>  };
>  
>  enum mpr_func_id {
> 
Re: [PATCH 8/8] iio: pressure: mprls0025pa: use aligned_s64 for timestamp
Posted by Jonathan Cameron 9 months, 3 weeks ago
On Thu, 17 Apr 2025 11:52:40 -0500
David Lechner <dlechner@baylibre.com> wrote:

> Follow the pattern of other drivers and use aligned_s64 for the
> timestamp. This will ensure the struct itself it also 8-byte aligned.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---
>  drivers/iio/pressure/mprls0025pa.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/pressure/mprls0025pa.h b/drivers/iio/pressure/mprls0025pa.h
> index 9d5c30afa9d69a6a606662aa7906a76347329cef..9fe9eb35e79d992b2a576e5d0af71113c6c47400 100644
> --- a/drivers/iio/pressure/mprls0025pa.h
> +++ b/drivers/iio/pressure/mprls0025pa.h
> @@ -41,7 +41,7 @@ struct mpr_ops;
>   */
>  struct mpr_chan {
>  	s32 pres;
> -	s64 ts;
> +	aligned_s64 ts;
>  };
Whilst you are here, no point in there being a named type for this.
Would you mind just pushing it into the struct mpr_data definition.

Might be a bug (I can't be bothered to work out the structure padding
to see if we end up with a gap after this) so fixes tag appropriate for
this one I think.

>  
>  enum mpr_func_id {
>