Linux kernel and device drivers for NXP i.MX platforms
 help / color / mirror / Atom feed
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 2/2] media: v4l2-core: add frame interval monitor helper
Date: Sat, 21 Nov 2026 17:13:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-227197@kernel.org> (raw)
In-Reply-To: <20261121170232.414316-3-shijiaqi_develop@163.com>

Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] media: v4l2-fim: missing struct v4l2_ctrl forward declaration in
  v4l2-fim.h
--

commit 4054bba4817179535aaa3077407029639e3caccd
Author: Jiaqi Shi <shijiaqi_develop@163.com>

media: v4l2-core: add frame interval monitor helper

This commit extracts the generic frame interval monitoring logic from the
staging i.MX media driver into a shared v4l2-core helper and converts the
i.MX driver to use it.

> diff --git a/include/media/v4l2-fim.h b/include/media/v4l2-fim.h
> new file mode 100644
> index 0000000000000..6d649a56b08f4
> --- /dev/null
> +++ b/include/media/v4l2-fim.h
> @@ -0,0 +1,40 @@

[ ... ]

> +#include <linux/ktime.h>
> +#include <linux/types.h>
> +
> +struct v4l2_ctrl_handler;
> +struct v4l2_fract;
> +struct v4l2_subdev;
> +
> +struct v4l2_fim;
> +
> +#define V4L2_FIM_NUM_CONTROLS	5
> +
> +struct v4l2_fim_config {
> +	u32 ctrl_base;
> +	u32 event_type;
> +	void *priv;
> +	bool (*external_timestamp)(void *priv, bool curval, bool use_val);
> +	void (*wait_first_timestamp)(void *priv);
> +};
> +
> +struct v4l2_fim *v4l2_fim_init(struct v4l2_subdev *sd,
> +			       struct v4l2_ctrl_handler *hdlr,
> +			       const struct v4l2_fim_config *config);
> +void v4l2_fim_reset(struct v4l2_fim *fim, bool curval, struct v4l2_ctrl *ctrl);

[Severity: Low]
Should struct v4l2_ctrl also be forward-declared here?  Without it, any
translation unit that includes media/v4l2-fim.h before media/v4l2-ctrls.h
scopes struct v4l2_ctrl to the v4l2_fim_reset() parameter list and fails
to compile with -Wvisibility and incompatible-pointer-type errors.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261121170232.414316-1-shijiaqi_develop@163.com?part=2

      reply	other threads:[~2026-11-21 17:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21 17:02 [PATCH v2 0/2] media: imx: staging cleanup and FIM export to v4l2-core Jiaqi Shi
2026-11-21 17:02 ` [PATCH 1/2] media: imx: remove legacy video node control and format handling Jiaqi Shi
2026-11-21 17:26   ` sashiko-bot
2026-11-21 17:02 ` [PATCH 2/2] media: v4l2-core: add frame interval monitor helper Jiaqi Shi
2026-11-21 17:13   ` 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-227197@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