From: David Lechner <dlechner@baylibre.com>
To: Yash Suthar <yashsuthar983@gmail.com>,
Jonathan Cameron <jic23@kernel.org>
Cc: "Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: accel: bmc150: use IIO_DECLARE_BUFFER_WITH_TS
Date: Sat, 8 Aug 2026 17:35:45 -0500 [thread overview]
Message-ID: <261dcaa5-3e9f-4da8-adb9-dae4eb7310f2@baylibre.com> (raw)
In-Reply-To: <20260808220236.421832-1-yashsuthar983@gmail.com>
On 8/8/26 5:02 PM, Yash Suthar wrote:
> Replace bmc150_accel_data plain buffer with
> IIO_DECLARE_BUFFER_WITH_TS() that also keep
> timestamp aligned.
Please don't wrap the lines so short. In git commits we usually
aim for 76 columns, IIRC.
>
> Signed-off-by: Yash Suthar <yashsuthar983@gmail.com>
> ---
> drivers/iio/accel/bmc150-accel.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/accel/bmc150-accel.h b/drivers/iio/accel/bmc150-accel.h
> index e8f26198359f..e0773533efeb 100644
> --- a/drivers/iio/accel/bmc150-accel.h
> +++ b/drivers/iio/accel/bmc150-accel.h
> @@ -64,7 +64,7 @@ struct bmc150_accel_data {
> struct bmc150_accel_trigger triggers[BMC150_ACCEL_TRIGGERS];
> struct mutex mutex;
> u8 fifo_mode, watermark;
> - s16 buffer[8];
> + IIO_DECLARE_BUFFER_WITH_TS(s16, buffer, 3);
> /*
> * Ensure there is sufficient space and correct alignment for
> * the timestamp if enabled
Probably also needs fixes tag since the old array was not properly aligned.
And as a follow-up task (in a separate patch), we can look at replacing
iio_push_to_buffers_with_timestamp() with iio_push_to_buffers_with_ts()
in this driver. Should be trivial in this case.
next prev parent reply other threads:[~2026-08-08 22:35 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-08 22:02 [PATCH] iio: accel: bmc150: use IIO_DECLARE_BUFFER_WITH_TS Yash Suthar
2026-08-08 22:35 ` David Lechner [this message]
2026-08-09 5:54 ` [PATCH v2] " Yash Suthar
2026-08-09 22:59 ` Jonathan Cameron
2026-08-09 23:18 ` Jonathan Cameron
2026-08-10 9:00 ` Andy Shevchenko
2026-08-10 21:58 ` Yash Suthar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=261dcaa5-3e9f-4da8-adb9-dae4eb7310f2@baylibre.com \
--to=dlechner@baylibre.com \
--cc=andy@kernel.org \
--cc=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=yashsuthar983@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox