From: sashiko-bot@kernel.org
To: "Jinseob Kim" <kimjinseob88@gmail.com>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v11 6/8] iio: osf: add IIO devices from capability reports
Date: Sun, 11 Oct 2026 23:29:38 +0000 [thread overview]
Message-ID: <sashiko-outbox-167513@kernel.org> (raw)
In-Reply-To: <20261011231340.42885-7-kimjinseob88@gmail.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] iio: osf: dropping valid frames and breaking sysfs cache on full kfifo
--
commit 615eea31301059211a3c98d8229f156971694125
Author: Jinseob Kim <kimjinseob88@gmail.com>
iio: osf: add IIO devices from capability reports
This commit registers IIO devices from supported capability descriptors and
exposes RAW, descriptor-derived SCALE, and initialized active-scan buffers. It
validates complete inventories and sample meaning, and faults incompatible
bound sessions.
> diff --git a/drivers/iio/sensorhubs/osf/osf_core.c b/drivers/iio/sensorhubs/osf/osf_core.c
> index b76619335335f..4f73ff5e9572b 100644
> --- a/drivers/iio/sensorhubs/osf/osf_core.c
> +++ b/drivers/iio/sensorhubs/osf/osf_core.c
[ ... ]
> + /* Serialize publication and cache admission with the session fault. */
> + guard(mutex)(&osf->latest_lock);
> + if (osf->session_fault)
> + return -EPROTO;
> +
> + ret = osf_iio_push_sample(indio_dev, values, sample.channel_count);
> + if (ret) {
> + dev_err_ratelimited(osf->dev,
> + "failed to push sensor %#x:%u sample: %d\n",
> + sample.sensor_type, sample.sensor_index, ret);
> + return ret;
> + }
> +
> + latest = osf_core_find_latest_sample(osf, sample.sensor_type,
[Severity: High]
If userspace falls behind reading from the IIO buffer and the kfifo fills up,
osf_iio_push_sample() will return an error (e.g. -EBUSY from the IIO core).
Does returning early here mean we drop the frame completely and skip updating
the latest_samples cache?
Since a full software ring buffer is a normal timing condition and not a
malformed hardware packet, should this code perhaps ignore the buffer push
error and proceed to update the sysfs cache so direct reads continue to work?
> + sample.sensor_index);
> + if (!latest) {
[ ... ]
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261011231340.42885-1-kimjinseob88@gmail.com?part=6
next prev parent reply other threads:[~2026-10-11 23:29 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-11 23:13 [PATCH v11 0/8] iio: add Open Sensor Fusion UART support Jinseob Kim
2026-10-11 23:13 ` [PATCH v11 1/8] dt-bindings: iio: add Open Sensor Fusion device Jinseob Kim
2026-10-12 19:10 ` Conor Dooley
2026-10-11 23:13 ` [PATCH v11 2/8] Documentation: iio: add Open Sensor Fusion driver overview Jinseob Kim
2026-10-11 23:13 ` [PATCH v11 3/8] iio: osf: add protocol decoding Jinseob Kim
2026-10-11 23:13 ` [PATCH v11 4/8] iio: osf: add validated stream parser Jinseob Kim
2026-10-11 23:13 ` [PATCH v11 5/8] iio: osf: add UART transport and core receive path Jinseob Kim
2026-10-11 23:13 ` [PATCH v11 6/8] iio: osf: add IIO devices from capability reports Jinseob Kim
2026-10-11 23:29 ` sashiko-bot [this message]
2026-10-11 23:13 ` [PATCH v11 7/8] iio: osf: add core KUnit tests Jinseob Kim
2026-10-11 23:29 ` sashiko-bot
2026-10-11 23:13 ` [PATCH v11 8/8] iio: osf: add IIO " Jinseob Kim
2026-10-11 23:39 ` sashiko-bot
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=sashiko-outbox-167513@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kimjinseob88@gmail.com \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.