Skip to contentSkip to conversation

iio: buffer: Move from int64_t to s64 for timestamp

PATCH Applied Andy Shevchenko 2 participants 2 messages Apr 27 – Apr 28 IIO

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 iio: buffer: Move from int64_t to s64 for timestamp

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.

---
 drivers/iio/industrialio-buffer.c | 2 +-
 include/linux/iio/buffer.h        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/industrialio-buffer.c +1 -1
index 46f36a6ed271..6d92295422be 100644
@@ -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);
 
include/linux/iio/buffer.h +1 -1
index d37f82678f71..e0344d51b4f9 100644
@@ -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);
Signature · 1 line
2.50.1
maintainer Applied
#1 lore raw
Quoted 9 lines · On Mon, 27 Apr 2026 20:51:47 +0200 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.

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

Quoted 31 lines
---
 drivers/iio/industrialio-buffer.c | 2 +-
 include/linux/iio/buffer.h        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
drivers/iio/industrialio-buffer.c +1 -1
index 46f36a6ed271..6d92295422be 100644
@@ -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);
 
include/linux/iio/buffer.h +1 -1
index d37f82678f71..e0344d51b4f9 100644
@@ -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);