From: sashiko-bot@kernel.org
To: "Jiaqi Shi" <shijiaqi_develop@163.com>, imx@lists.linux.dev
Cc: Frank.Li@kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH 3/3] media: imx: allow setting FIM input capture channel
Date: Sat, 21 Nov 2026 14:24:24 +0000 [thread overview]
Message-ID: <sashiko-outbox-227094@kernel.org> (raw)
In-Reply-To: <20261121141412.319802-4-shijiaqi_develop@163.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] media: imx: unreachable ICAP_CHANNEL case in fim_s_ctrl() due to
clustering
--
commit 3f6e136c4d9e74ffb8117949ce551b405c749b3a
Author: Jiaqi Shi <shijiaqi_develop@163.com>
media: imx: allow setting FIM input capture channel
This commit adds a V4L2_CID_IMX_FIM_ICAP_CHANNEL case to fim_s_ctrl() and
reformats a wait_for_completion_timeout() call.
> diff --git a/drivers/staging/media/imx/imx-media-fim.c b/drivers/staging/media/imx/imx-media-fim.c
> index b6467e29ac288..300635a3b5527 100644
> --- a/drivers/staging/media/imx/imx-media-fim.c
> +++ b/drivers/staging/media/imx/imx-media-fim.c
[ ... ]
> @@ -75,6 +74,8 @@ static int fim_s_ctrl(struct v4l2_ctrl *ctrl)
> if (v4l2_fim_is_streaming(fim->core))
> ret = -EBUSY;
> break;
> + case V4L2_CID_IMX_FIM_ICAP_CHANNEL:
> + break;
> default:
> ret = -EINVAL;
> break;
[Severity: Low]
Is this new V4L2_CID_IMX_FIM_ICAP_CHANNEL case reachable?
imx_media_fim_init() clusters fim->icap_ctrl[] via
v4l2_ctrl_cluster(FIM_NUM_ICAP_CONTROLS, fim->icap_ctrl) with
V4L2_CID_IMX_FIM_ICAP_EDGE at index 0 as the cluster master. When
userspace updates any control in a cluster, try_or_set_cluster() always
invokes s_ctrl on ctrl->cluster[0], so fim_s_ctrl() is always called with
ctrl->id == V4L2_CID_IMX_FIM_ICAP_EDGE. Because v4l2_fim_reset() then
reads both icap_edge->val and icap_chan->val in
imx_fim_external_timestamp(), setting V4L2_CID_IMX_FIM_ICAP_CHANNEL was
not rejected with -EINVAL, and this new case is dead code that also omits
the v4l2_fim_is_streaming(fim->core) check.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261121141412.319802-1-shijiaqi_develop@163.com?part=3
prev parent reply other threads:[~2026-11-21 14:24 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-21 14:14 [PATCH 0/3] media: imx: staging cleanup and FIM export to v4l2-core Jiaqi Shi
2026-11-21 14:14 ` [PATCH 1/3] media: imx: remove legacy video node control and format handling Jiaqi Shi
2026-11-21 14:40 ` sashiko-bot
2026-11-21 14:14 ` [PATCH 2/3] media: v4l2-core: add frame interval monitor helper Jiaqi Shi
2026-11-21 14:27 ` sashiko-bot
2026-11-21 14:14 ` [PATCH 3/3] media: imx: allow setting FIM input capture channel Jiaqi Shi
2026-11-21 14:24 ` sashiko-bot [this message]
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-227094@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=imx@lists.linux.dev \
--cc=media-ci@linuxtv.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=shijiaqi_develop@163.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