From: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
To: Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Jai Luthra <jai.luthra@ideasonboard.com>,
Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Subject: [PATCH v2 2/3] media: subdev: Minor v4l2_subdev_get_frame_desc_passthrough() cleanups
Date: Tue, 17 Mar 2026 14:09:41 +0200 [thread overview]
Message-ID: <20260317-frame-desc-passthrough-impro-v2-2-0c93b437d85d@ideasonboard.com> (raw)
In-Reply-To: <20260317-frame-desc-passthrough-impro-v2-0-0c93b437d85d@ideasonboard.com>
Minor code cleanups, no functional change.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
---
drivers/media/v4l2-core/v4l2-subdev.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
index 9efd14d4026f..2757378c628a 100644
--- a/drivers/media/v4l2-core/v4l2-subdev.c
+++ b/drivers/media/v4l2-core/v4l2-subdev.c
@@ -2549,14 +2549,13 @@ int v4l2_subdev_get_frame_desc_passthrough(struct v4l2_subdev *sd,
unsigned int pad,
struct v4l2_mbus_frame_desc *fd)
{
- const struct media_pad *pads = sd->entity.pads;
struct media_pad *local_sink_pad;
struct v4l2_subdev_route *route;
struct v4l2_subdev_state *state;
struct device *dev = sd->dev;
int ret = 0;
- if (WARN_ON(!(pads[pad].flags & MEDIA_PAD_FL_SOURCE)))
+ if (WARN_ON(!(sd->entity.pads[pad].flags & MEDIA_PAD_FL_SOURCE)))
return -EINVAL;
state = v4l2_subdev_lock_and_get_active_state(sd);
@@ -2577,7 +2576,6 @@ int v4l2_subdev_get_frame_desc_passthrough(struct v4l2_subdev *sd,
struct v4l2_mbus_frame_desc_entry *source_entry = NULL;
struct media_pad *remote_source_pad;
struct v4l2_subdev *remote_sd;
- unsigned int i;
if (route->source_pad != pad ||
route->sink_pad != local_sink_pad->index)
@@ -2622,7 +2620,7 @@ int v4l2_subdev_get_frame_desc_passthrough(struct v4l2_subdev *sd,
}
}
- for (i = 0; i < source_fd.num_entries; i++) {
+ for (unsigned int i = 0; i < source_fd.num_entries; i++) {
if (source_fd.entry[i].stream == route->sink_stream) {
source_entry = &source_fd.entry[i];
break;
@@ -2630,7 +2628,7 @@ int v4l2_subdev_get_frame_desc_passthrough(struct v4l2_subdev *sd,
}
if (!source_entry) {
- dev_dbg(sd->dev,
+ dev_dbg(dev,
"Failed to find stream %u from source frame desc\n",
route->sink_stream);
ret = -EPIPE;
@@ -2638,7 +2636,7 @@ int v4l2_subdev_get_frame_desc_passthrough(struct v4l2_subdev *sd,
}
if (fd->num_entries >= V4L2_FRAME_DESC_ENTRY_MAX) {
- dev_dbg(sd->dev, "Frame desc entry limit reached\n");
+ dev_dbg(dev, "Frame desc entry limit reached\n");
ret = -ENOSPC;
goto out_unlock;
}
--
2.43.0
next prev parent reply other threads:[~2026-03-17 12:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-17 12:09 [PATCH v2 0/3] media: subdev: v4l2_subdev_get_frame_desc_passthrough improvements Tomi Valkeinen
2026-03-17 12:09 ` [PATCH v2 1/3] media: subdev: Improve v4l2_subdev_get_frame_desc_passthrough() kdoc Tomi Valkeinen
2026-03-18 16:24 ` Laurent Pinchart
2026-03-17 12:09 ` Tomi Valkeinen [this message]
2026-03-18 16:25 ` [PATCH v2 2/3] media: subdev: Minor v4l2_subdev_get_frame_desc_passthrough() cleanups Laurent Pinchart
2026-03-17 12:09 ` [PATCH v2 3/3] media: subdev: Split v4l2_subdev_get_frame_desc_passthrough() into locked and unlocked Tomi Valkeinen
2026-03-18 17:00 ` Laurent Pinchart
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=20260317-frame-desc-passthrough-impro-v2-2-0c93b437d85d@ideasonboard.com \
--to=tomi.valkeinen+renesas@ideasonboard.com \
--cc=jai.luthra@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.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®