mbox series

[v2,0/2] : pressure: bmp280: Improve pushing of data to buffer

Message ID 20240929112511.100292-1-vassilisamir@gmail.com (mailing list archive)
Headers show
Series : pressure: bmp280: Improve pushing of data to buffer | expand

Message

Vasileios Amoiridis Sept. 29, 2024, 11:25 a.m. UTC
Changes in v2:
	- Add 1st commit with a small fix of some data types. Shouldn't pose a
	  problem.
	- In commit no.2 add logic with "offset" to make it more clear what we
	  are adding in the buffer. Also move the memcpy() operations after the
	  if() statements so the memcpy happens only if the data are correct to
	  avoid overhead for no reason.

P.S. After this patchseries is applied, I will rebase this [1] and resend it.

[1]: https://lore.kernel.org/linux-iio/20240914002900.45158-1-vassilisamir@gmail.com/

---
v1: https://lore.kernel.org/linux-iio/20240823172017.9028-1-vassilisamir@gmail.com/

Vasileios Amoiridis (2):
  iio: pressure: bmp280: Fix type for raw values
  iio: pressure: bmp280: Use char instead of s32 for data buffer

 drivers/iio/pressure/bmp280-core.c | 75 +++++++++++++++++++-----------
 drivers/iio/pressure/bmp280.h      |  5 +-
 2 files changed, 51 insertions(+), 29 deletions(-)