Linux Trace Kernel
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Detlev Casanova" <detlev.casanova@collabora.com>
Cc: linux-trace-kernel@vger.kernel.org, media-ci@linuxtv.org
Subject: Re: [PATCH v3 7/9] media: Add stream on/off traces and run them in the ioctl
Date: Wed, 25 Nov 2026 18:57:01 +0000	[thread overview]
Message-ID: <sashiko-outbox-234023@kernel.org> (raw)
In-Reply-To: <20261125-v4l2-add-ftrace-v3-7-1d1db48372ed@collabora.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] media: v4l2: v4l2_streamon and v4l2_streamoff trace events
  omit queue type
- [Low] media: v4l2: unsigned u32 fd field in v4l2_stream_class
  tracepoints
--

commit 56aeec86320ecb65b07b7c0b600412ff631ceacb
Author: Detlev Casanova <detlev.casanova@collabora.com>

media: Add stream on/off traces and run them in the ioctl

This commit defines v4l2_streamon and v4l2_streamoff trace events in
include/trace/events/v4l2.h and triggers them from v4l_streamon() and
v4l_streamoff() in drivers/media/v4l2-core/v4l2-ioctl.c.

[Severity: Medium]
In include/trace/events/v4l2.h (v4l2_stream_class, lines 273-297) and
drivers/media/v4l2-core/v4l2-ioctl.c (v4l_streamon at line 1974 and
v4l_streamoff at line 1988), should v4l2_stream_class also record the
v4l2_buf_type queue type?

As the comment above v4l2_stream_class notes, mem2mem drivers start and
stop both output and capture queues on the same tgid and fd pair. Without
recording the queue type passed in *(unsigned int *)arg (which can be
formatted with the existing show_type() helper in
include/trace/events/v4l2.h), trace consumers cannot tell which queue was
started or stopped.

[Severity: Low]
In include/trace/events/v4l2.h (v4l2_stream_class, lines 274-286), can
declaring fd as u32 and printing it with %u misreport negative fd values?

In include/media/v4l2-fh.h, struct v4l2_fh defines fd as a signed int,
and __video_do_ioctl() in drivers/media/v4l2-core/v4l2-ioctl.c (line
3113) sets vfh->fd = -1 when iterate_fd() returns 0 (such as when the
video device is opened on file descriptor 0 or is not found in
current->files). Recording fd as u32 marks the trace field unsigned and
prints -1 as 4294967295.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261125-v4l2-add-ftrace-v3-0-1d1db48372ed@collabora.com?part=7

  reply	other threads:[~2026-11-25 18:57 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-25 18:33 [PATCH v3 0/9] v4l2: Add tracing for stateless codecs Detlev Casanova
2026-11-25 18:33 ` [PATCH v3 1/9] media: Move visl traces to v4l2-core Detlev Casanova
2026-11-25 18:58   ` sashiko-bot
2026-11-25 18:33 ` [PATCH v3 2/9] media: Map each struct field to its own trace field Detlev Casanova
2026-11-25 18:33 ` [PATCH v3 3/9] media: Add tgid and fd fields in v4l2_fh struct Detlev Casanova
2026-11-25 18:59   ` sashiko-bot
2026-11-25 18:33 ` [PATCH v3 4/9] media: Add tgid and fd to the v4l2-requests trace fields Detlev Casanova
2026-11-25 18:56   ` sashiko-bot
2026-11-25 18:33 ` [PATCH v3 5/9] media: Add missing types to v4l2_ctrl_ptr Detlev Casanova
2026-11-25 18:33 ` [PATCH v3 6/9] media: Trace the stateless controls when set in v4l2-ctrls-core.c Detlev Casanova
2026-11-25 19:00   ` sashiko-bot
2026-11-25 18:33 ` [PATCH v3 7/9] media: Add stream on/off traces and run them in the ioctl Detlev Casanova
2026-11-25 18:57   ` sashiko-bot [this message]
2026-11-25 18:33 ` [PATCH v3 8/9] media: Add HW run/done trace events Detlev Casanova
2026-11-25 18:33 ` [PATCH v3 9/9] media: hantro: Add v4l2_hw run/done traces Detlev Casanova
2026-11-25 19:01   ` 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-234023@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=detlev.casanova@collabora.com \
    --cc=linux-trace-kernel@vger.kernel.org \
    --cc=media-ci@linuxtv.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox