public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1 1/1] iio: buffer: Move from int64_t to s64 for timestamp
@ 2026-04-27 18:51 Andy Shevchenko
  2026-04-28 16:37 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2026-04-27 18:51 UTC (permalink / raw)
  To: Jonathan Cameron, David Lechner, linux-iio, linux-kernel
  Cc: Nuno Sá, Andy Shevchenko, Andy Shevchenko

iio_push_to_buffers_with_ts_unaligned() uses int64_t for timestamp.
Move it from int64_t to s64 to make consistent with:
- iio_push_to_buffers_with_ts()
- all current users that supply s64 anyway

This will reduce potential of wrong type being chosen when using
this API.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/iio/industrialio-buffer.c | 2 +-
 include/linux/iio/buffer.h        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
index 46f36a6ed271..6d92295422be 100644
--- a/drivers/iio/industrialio-buffer.c
+++ b/drivers/iio/industrialio-buffer.c
@@ -2422,7 +2422,7 @@ EXPORT_SYMBOL_GPL(iio_push_to_buffers);
 int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
 					  const void *data,
 					  size_t data_sz,
-					  int64_t timestamp)
+					  s64 timestamp)
 {
 	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
 
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index d37f82678f71..e0344d51b4f9 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -71,7 +71,7 @@ static inline int iio_push_to_buffers_with_ts(struct iio_dev *indio_dev,
 
 int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
 					  const void *data, size_t data_sz,
-					  int64_t timestamp);
+					  s64 timestamp);
 
 bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev,
 				   const unsigned long *mask);
-- 
2.50.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] iio: buffer: Move from int64_t to s64 for timestamp
  2026-04-27 18:51 [PATCH v1 1/1] iio: buffer: Move from int64_t to s64 for timestamp Andy Shevchenko
@ 2026-04-28 16:37 ` Jonathan Cameron
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2026-04-28 16:37 UTC (permalink / raw)
  To: Andy Shevchenko
  Cc: David Lechner, linux-iio, linux-kernel, Nuno Sá,
	Andy Shevchenko

On Mon, 27 Apr 2026 20:51:47 +0200
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> iio_push_to_buffers_with_ts_unaligned() uses int64_t for timestamp.
> Move it from int64_t to s64 to make consistent with:
> - iio_push_to_buffers_with_ts()
> - all current users that supply s64 anyway
> 
> This will reduce potential of wrong type being chosen when using
> this API.
> 
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
I was being overly optimistic and thinking we'd get rid of this ABI by
now so not worth fixing.  That's going a bit slow, so fair enough.

Applied.

Thanks,

Jonathan

> ---
>  drivers/iio/industrialio-buffer.c | 2 +-
>  include/linux/iio/buffer.h        | 2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/industrialio-buffer.c b/drivers/iio/industrialio-buffer.c
> index 46f36a6ed271..6d92295422be 100644
> --- a/drivers/iio/industrialio-buffer.c
> +++ b/drivers/iio/industrialio-buffer.c
> @@ -2422,7 +2422,7 @@ EXPORT_SYMBOL_GPL(iio_push_to_buffers);
>  int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
>  					  const void *data,
>  					  size_t data_sz,
> -					  int64_t timestamp)
> +					  s64 timestamp)
>  {
>  	struct iio_dev_opaque *iio_dev_opaque = to_iio_dev_opaque(indio_dev);
>  
> diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
> index d37f82678f71..e0344d51b4f9 100644
> --- a/include/linux/iio/buffer.h
> +++ b/include/linux/iio/buffer.h
> @@ -71,7 +71,7 @@ static inline int iio_push_to_buffers_with_ts(struct iio_dev *indio_dev,
>  
>  int iio_push_to_buffers_with_ts_unaligned(struct iio_dev *indio_dev,
>  					  const void *data, size_t data_sz,
> -					  int64_t timestamp);
> +					  s64 timestamp);
>  
>  bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev,
>  				   const unsigned long *mask);


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-04-28 16:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-27 18:51 [PATCH v1 1/1] iio: buffer: Move from int64_t to s64 for timestamp Andy Shevchenko
2026-04-28 16:37 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox