diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2024-06-19 02:56:01 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2024-08-26 16:36:14 +0300 |
commit | d1307671e5221967809c4b626affbad29e371006 (patch) | |
tree | ac9272d205436d4da9ab577f84e94c9a95546f91 /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 9bde4f7caf38df94257d2483e89f371b1a530e9a (diff) |
media: v4l2-subdev: Refactor warnings in v4l2_subdev_link_validate()
The v4l2_subdev_link_validate() function prints a one-time warning if it
gets called on a link whose source or sink is not a subdev. As links get
validated in the context of their sink, a call to the helper when the
link's sink is not a subdev indicates that the driver has set its
.link_validate() handler to v4l2_subdev_link_validate() on a non-subdev
entity, which is a clear driver bug. On the other hand, the link's
source not being a subdev indicates that the helper is used for a subdev
connected to a video output device, which is a lesser issue, if only
because this is currently common practice.
There are no drivers left in the kernel that use
v4l2_subdev_link_validate() in a context where it may get called on a
non-subdev sink. Replace the pr_warn_once() with a WARN_ON_ONCE() in
this case to make sure that new offenders won't be introduced.
A subsequent change will improve the v4l2_subdev_link_validate() helper
to properly support validating video device to subdev links.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions