From: Andy Shevchenko <andriy.shevchenko@intel.com>
To: Yash Suthar <yashsuthar983@gmail.com>
Cc: jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, grondon@gmail.com, linusw@kernel.org,
hexlabsecurity@proton.me, sakari.ailus@linux.intel.com,
srinivas.pandruvada@linux.intel.com, linux-iio@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] iio: accel: bmc150: use aligned scan buffer for both trigger and fifo
Date: Sat, 15 Aug 2026 11:53:38 +0300 [thread overview]
Message-ID: <aoApEqsbXp9Pd7Mf@ashevche-desk.local> (raw)
In-Reply-To: <20260814101845.301769-2-yashsuthar983@gmail.com>
On Fri, Aug 14, 2026 at 03:48:42PM +0530, Yash Suthar wrote:
> Drop buffer as duplicate and s16 is not correct we needed __le16 as little
> endian, keep scan at the end of the bmc150_accel_data struct with
> IIO_DMA_MINALIGN, and use it for both paths.
...
> mutex_lock(&data->mutex);
> ret = regmap_bulk_read(data->regmap, BMC150_ACCEL_REG_XOUT_L,
> - data->buffer, AXIS_MAX * 2);
> + data->scan.channels, AXIS_MAX * 2);
> + if (!ret)
> + iio_push_to_buffers_with_timestamp(indio_dev, &data->scan,
> + pf->timestamp);
> mutex_unlock(&data->mutex);
> - if (ret < 0)
> - goto err_read;
>
> - iio_push_to_buffers_with_timestamp(indio_dev, data->buffer,
> - pf->timestamp);
> -err_read:
> iio_trigger_notify_done(indio_dev->trig);
Vast of these lines do not need to be touched. Please, keep the usual pattern
of checking for errors first.
> return IRQ_HANDLED;
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2026-08-15 8:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-14 10:18 [PATCH 0/3] iio: accel: bmc150: DMA-safe buffers and use iio_push_to_buffers_with_ts() Yash Suthar
2026-08-14 10:18 ` [PATCH 1/3] iio: accel: bmc150: use aligned scan buffer for both trigger and fifo Yash Suthar
2026-08-14 20:01 ` Linus Walleij
2026-08-15 8:53 ` Andy Shevchenko [this message]
2026-08-14 10:18 ` [PATCH 2/3] iio: accel: bmc150: use DMA-safe buffers for regmap bulk reads Yash Suthar
2026-08-14 20:02 ` Linus Walleij
2026-08-15 8:55 ` Andy Shevchenko
2026-08-14 10:18 ` [PATCH 3/3] iio: accel: bmc150: use iio_push_to_buffers_with_ts() Yash Suthar
2026-08-14 20:03 ` Linus Walleij
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=aoApEqsbXp9Pd7Mf@ashevche-desk.local \
--to=andriy.shevchenko@intel.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=grondon@gmail.com \
--cc=hexlabsecurity@proton.me \
--cc=jic23@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=sakari.ailus@linux.intel.com \
--cc=srinivas.pandruvada@linux.intel.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
all inboxes | Powered by JetHome®