]> git.ipfire.org Git - thirdparty/kernel/linux.git/log
thirdparty/kernel/linux.git
6 weeks agodt-bindings: media: convert nxp,tda1997x.txt to yaml format
Frank Li [Wed, 15 Oct 2025 15:48:11 +0000 (11:48 -0400)] 
dt-bindings: media: convert nxp,tda1997x.txt to yaml format

Convert nxp,tda1997x.txt to yaml format

Additional changes:
- update audio width to 8, 16, 24, 32.
- keep one example only.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: Convert ti,tvp5150.txt to yaml format.
Frank Li [Tue, 14 Oct 2025 18:55:09 +0000 (14:55 -0400)] 
dt-bindings: media: Convert ti,tvp5150.txt to yaml format.

Convert ti,tvp5150.txt to yaml format.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: David Heidelberg <david@ixit.cz>
[Sakari Ailus: Align the endpoint properties to the right column.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Add DW9800K support
Griffin Kroah-Hartman [Thu, 16 Oct 2025 11:35:23 +0000 (13:35 +0200)] 
media: i2c: dw9719: Add DW9800K support

The DW9800K is a similar part to the DW9719. The method for operation is
the same as the DW9719, but the register set is different. Add support
for this part to the existing dw9719 driver.

Tested on the Fairphone 5 smartphone.

Tested-by: Luca Weiss <luca.weiss@fairphone.com>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: i2c: dw9719: Document DW9800K
Griffin Kroah-Hartman [Thu, 16 Oct 2025 11:35:22 +0000 (13:35 +0200)] 
dt-bindings: media: i2c: dw9719: Document DW9800K

Document the Dongwoon Anatech DW9800K.

Acked-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Griffin Kroah-Hartman <griffin.kroah@fairphone.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Fix power on/off sequence
Val Packett [Sat, 20 Sep 2025 12:03:47 +0000 (14:03 +0200)] 
media: i2c: dw9719: Fix power on/off sequence

The "jiggle" code was not actually expecting failure, which it should
because that's what actually happens when the device wasn't already woken
up by the regulator power-on (i.e. in the case of a shared regulator).

Also, do actually enter the internal suspend mode on shutdown, to save
power in the case of a shared regulator.

Also, wait a bit longer (2x tOPR) on waking up, 1x is not enough at least
on the DW9718S as found on the motorola-nora smartphone.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Update PM last busy time upon close
Val Packett [Sat, 20 Sep 2025 12:03:46 +0000 (14:03 +0200)] 
media: i2c: dw9719: Update PM last busy time upon close

Update the close callback to match other similar drivers like dw9768.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Add DW9718S support
Val Packett [Sat, 20 Sep 2025 12:03:45 +0000 (14:03 +0200)] 
media: i2c: dw9719: Add DW9718S support

The DW9718S is a similar part that uses a different register set but
follows the same method of operation otherwise. Add support for it
to the existing dw9719 driver.

Tested on the Moto E5 (motorola-nora) smartphone.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Add driver_data matching
Val Packett [Sat, 20 Sep 2025 12:03:44 +0000 (14:03 +0200)] 
media: i2c: dw9719: Add driver_data matching

In preparation for adding models with different register sets, start
assigning the model based on the i2c match data.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Add an of_match_table
Val Packett [Sat, 20 Sep 2025 12:03:43 +0000 (14:03 +0200)] 
media: i2c: dw9719: Add an of_match_table

Allow the dw9719 driver to be attached via FDT.

Signed-off-by: Val Packett <val@packett.cool>
Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Remove unused i2c device id table
André Apitzsch [Sat, 20 Sep 2025 12:03:42 +0000 (14:03 +0200)] 
media: i2c: dw9719: Remove unused i2c device id table

Nothing depends on the I²C device ID table, so remove it.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: i2c: dw9719: Deprecate dongwoon,vcm-freq
André Apitzsch [Sat, 20 Sep 2025 12:03:41 +0000 (14:03 +0200)] 
media: i2c: dw9719: Deprecate dongwoon,vcm-freq

The name of property "dongwoon,vcm-freq" doesn't match its purpose.
Change the name of the property to "dongwoon,vcm-prescale" to better
describe its purpose and deprecate the old one.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agodt-bindings: media: i2c: Add DW9718S, DW9719 and DW9761 VCM
André Apitzsch [Sat, 20 Sep 2025 12:03:40 +0000 (14:03 +0200)] 
dt-bindings: media: i2c: Add DW9718S, DW9719 and DW9761 VCM

Document Dongwoon DW9718S, DW9719 and DW9761 VCM devicetree bindings.

Signed-off-by: André Apitzsch <git@apitzsch.eu>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: ivsc: Release csi_dev reference early in mei_ace_setup_dev_link()
Ma Ke [Mon, 29 Sep 2025 01:30:07 +0000 (09:30 +0800)] 
media: ivsc: Release csi_dev reference early in mei_ace_setup_dev_link()

Put the reference to csi_dev acquired during driver probe in
mei_ace_setup_dev_link() inside the same function, instead of during driver
unbind in mei_ace_remove(). This can be done as device_link_add() already
takes a reference to csi_dev.

Signed-off-by: Ma Ke <make24@iscas.ac.cn>
[Sakari Ailus: Rework commit message.]
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: MAINTAINERS: Assign ov08x40 driver to Jimmy
Sakari Ailus [Mon, 22 Sep 2025 11:10:55 +0000 (14:10 +0300)] 
media: MAINTAINERS: Assign ov08x40 driver to Jimmy

Wentong's e-mail no longer works; assign the ov08x40 driver to Jimmy Su.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
6 weeks agomedia: v4l2-ctrls: set AV1 sequence flags for testing
Pavan Bobba [Tue, 28 Oct 2025 06:26:23 +0000 (11:56 +0530)] 
media: v4l2-ctrls: set AV1 sequence flags for testing

Initialize additional AV1 sequence parameters in std_init_compound()
to make the default AV1 sequence control compatible with compliance
and userspace testing tools.

Specifically, set:
 - enable both SUBSAMPLING_X and SUBSAMPLING_Y flags

These defaults help ensure that V4L2_CID_AV1_SEQUENCE behaves
consistently during validation and v4l2-compliance tests.

Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
[hverkuil: align everything a bit better]
[hverkuil: replaced Pavan's comment with comment suggested by Nicolas]
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: renesas: fdp1: Use %pe format specifier
Ricardo Ribalda [Mon, 20 Oct 2025 07:53:41 +0000 (07:53 +0000)] 
media: renesas: fdp1: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./platform/renesas/rcar_fdp1.c:2303:4-11: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: allegro: fix race conditions in channel handling
Matthias Fend [Mon, 1 Sep 2025 15:13:36 +0000 (17:13 +0200)] 
media: allegro: fix race conditions in channel handling

Since the channel list is used in different contexts, it must be ensured
that it is always consistent. Also, the channels contained in the list may
only be released when they are no longer needed in any context.

Add a lock to protect the list and reference handling for the channels.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: allegro: process all pending status mbox messages
Matthias Fend [Mon, 1 Sep 2025 15:13:37 +0000 (17:13 +0200)] 
media: allegro: process all pending status mbox messages

Under certain circumstances, not every message written by the MCU to the
status mailbox may trigger a corresponding interrupt. This is likely when
multiple messages are generated in a very short period of time. Since the
current implementation only processes one message per interrupt, even if
multiple messages are already available in the mailbox, expected messages
are either not received or are processed late. This leads to various
subsequent problems and causes the driver to no longer function properly.

The behavior has been adjusted so that after an interrupt, all messages
available in the mailbox are processed.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: allegro: print warning if channel creation timeout occurs
Matthias Fend [Mon, 1 Sep 2025 15:13:36 +0000 (17:13 +0200)] 
media: allegro: print warning if channel creation timeout occurs

This message can be helpful for troubleshooting and there is already a
corresponding message in case of a channel destroy timeout.
Add a similar message for channel creation.

Signed-off-by: Matthias Fend <matthias.fend@emfend.at>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: v4l2-ctrls: add full AV1 profile validation in validate_av1_sequence()
Pavan Bobba [Sat, 13 Sep 2025 10:52:46 +0000 (16:22 +0530)] 
media: v4l2-ctrls: add full AV1 profile validation in validate_av1_sequence()

Complete the "TODO: PROFILES" by enforcing profile-specific and
monochrome constraints as defined by the AV1 specification
(Section 5.5.2, "Color config syntax").

The validator now checks:

 - Flags: reject any unknown bits set in sequence->flags
 - Profile range: only profiles 0..2 are valid
 - Profile 0: 8/10-bit only, subsampling must be 4:2:0 (sx=1, sy=1),
   monochrome allowed
 - Profile 1: 8/10-bit only, subsampling must be 4:4:4 (sx=0, sy=0),
   monochrome forbidden
 - Profile 2:
    * 8/10-bit: only 4:2:2 allowed (sx=1, sy=0)
    * 12-bit: 4:4:4 (sx=0, sy=0), 4:2:2 (sx=1, sy=0), or 4:2:0 (sx=1, sy=1)
      allowed
 - Monochrome path (all profiles except 1): forces subsampling_x=1,
   subsampling_y=1, separate_uv_delta_q=0

These checks prevent userspace from providing invalid AV1 sequence
headers that would otherwise be accepted, leading to undefined driver
or hardware behavior.

Signed-off-by: Pavan Bobba <opensource206@gmail.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: mediatek: vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init()
Haoxiang Li [Mon, 15 Sep 2025 12:09:38 +0000 (20:09 +0800)] 
media: mediatek: vcodec: Fix a reference leak in mtk_vcodec_fw_vpu_init()

vpu_get_plat_device() increases the reference count of the returned
platform device. However, when devm_kzalloc() fails, the reference
is not released, causing a reference leak.

Fix this by calling put_device() on fw_pdev->dev before returning
on the error path.

Fixes: e25a89f743b1 ("media: mtk-vcodec: potential dereference of null pointer")
Cc: stable@vger.kernel.org
Signed-off-by: Haoxiang Li <haoxiang_li2024@163.com>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Tzung-Bi Shih <tzungbi@kernel.org>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: amphion: Cancel message work before releasing the VPU core
Ming Qian [Tue, 16 Sep 2025 06:10:07 +0000 (14:10 +0800)] 
media: amphion: Cancel message work before releasing the VPU core

To avoid accessing the VPU register after release of the VPU core,
cancel the message work and destroy the workqueue that handles the
VPU message before release of the VPU core.

Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: amphion: Remove vpu_vb_is_codecconfig
Ming Qian [Tue, 16 Sep 2025 06:08:53 +0000 (14:08 +0800)] 
media: amphion: Remove vpu_vb_is_codecconfig

Currently the function vpu_vb_is_codecconfig() always returns 0.
Delete it and its related code.

Fixes: 3cd084519c6f ("media: amphion: add vpu v4l2 m2m support")
Cc: stable@vger.kernel.org
Signed-off-by: Ming Qian <ming.qian@oss.nxp.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: verisilicon: Protect G2 HEVC decoder against invalid DPB index
Nicolas Dufresne [Mon, 22 Sep 2025 18:43:39 +0000 (14:43 -0400)] 
media: verisilicon: Protect G2 HEVC decoder against invalid DPB index

Fix the Hantro G2 HEVC decoder so that we use DPB index 0 whenever a
ninvalid index is received from user space. This protects the hardware
from doing faulty memory access which then leads to bus errors.

To be noted that when a reference is missing, userspace such as GStreamer
passes an invalid DPB index of 255. This issue was found by seeking to a
CRA picture using GStreamer. The framework is currently missing the code
to skip over RASL pictures placed after the CRA. This situation can also
occur while doing live streaming over lossy transport.

Fixes: cb5dd5a0fa518 ("media: hantro: Introduce G2/HEVC decoder")
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: verisilicon: Fix CPU stalls on G2 bus error
Nicolas Dufresne [Mon, 22 Sep 2025 18:43:38 +0000 (14:43 -0400)] 
media: verisilicon: Fix CPU stalls on G2 bus error

In some seek stress tests, we are getting IRQ from the G2 decoder where
the dec_bus_int and the dec_e bits are high, meaning the decoder is
still running despite the error.

Fix this by reworking the IRQ handler to only finish the job once we
have reached completion and move the software reset to when our software
watchdog triggers.

This way, we let the hardware continue on errors when it did not self
reset and in worse case scenario the hardware timeout will
automatically stop it. The actual error will be fixed in a follow up
patch.

Fixes: 3385c514ecc5a ("media: hantro: Convert imx8m_vpu_g2_irq to helper")
Cc: stable@vger.kernel.org
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: platform: mtk-mdp3: fix device leaks at probe
Johan Hovold [Wed, 24 Sep 2025 14:39:19 +0000 (16:39 +0200)] 
media: platform: mtk-mdp3: fix device leaks at probe

Make sure to drop the references taken when looking up the subsys
devices during probe on probe failure (e.g. probe deferral) and on
driver unbind.

Similarly, drop the SCP device reference after retrieving its platform
data during probe to avoid leaking it.

Note that holding a reference to a device does not prevent its driver
data from going away.

Fixes: 61890ccaefaf ("media: platform: mtk-mdp3: add MediaTek MDP3 driver")
Cc: stable@vger.kernel.org # 6.1
Cc: Moudy Ho <moudy.ho@mediatek.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
7 weeks agomedia: mediatek: vcodec: Use spinlock for context list protection lock
Chen-Yu Tsai [Wed, 20 Aug 2025 07:54:05 +0000 (15:54 +0800)] 
media: mediatek: vcodec: Use spinlock for context list protection lock

Previously a mutex was added to protect the encoder and decoder context
lists from unexpected changes originating from the SCP IP block, causing
the context pointer to go invalid, resulting in a NULL pointer
dereference in the IPI handler.

Turns out on the MT8173, the VPU IPI handler is called from hard IRQ
context. This causes a big warning from the scheduler. This was first
reported downstream on the ChromeOS kernels, but is also reproducible
on mainline using Fluster with the FFmpeg v4l2m2m decoders. Even though
the actual capture format is not supported, the affected code paths
are triggered.

Since this lock just protects the context list and operations on it are
very fast, it should be OK to switch to a spinlock.

Fixes: 6467cda18c9f ("media: mediatek: vcodec: adding lock to protect decoder context list")
Fixes: afaaf3a0f647 ("media: mediatek: vcodec: adding lock to protect encoder context list")
Cc: Yunfei Dong <yunfei.dong@mediatek.com>
Cc: stable@vger.kernel.org
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: Fei Shao <fshao@chromium.org>
Reviewed-by: Tomasz Figa <tfiga@chromium.org>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agoMerge branch 'media-uapi' of git://git.lwn.net/linux into media-next
Mauro Carvalho Chehab [Sat, 18 Oct 2025 10:49:14 +0000 (12:49 +0200)] 
Merge branch 'media-uapi' of git://git.lwn.net/linux into media-next

* 'media-uapi' of git://git.lwn.net/linux: (23 commits)
  docs: media: dvb: fix dmx.h.rst.exceptions
  docs: media: dvb: headers: warn about broken cross references
  docs: media: dmx_types: place kerneldoc at the right namespace
  docs: cec: show broken xrefs and show TOC instead of cec.h content
  docs: cec: cec.h.rst.exceptions: fix broken references from cec.h
  media: docs: add some C domain missing references
  media: docs: videodev2.h.rst.exceptions: ignore struct __kernel_v4l2_timeval
  media: docs: add a missing reference for VIDIOC_QUERY_CTRL
  docs: media: videodev2.h.rst.exceptions: fix namespace on refs
  docs: media: add missing c namespace to V4L headers
  docs: kernel_include.py: use get_close_matches() to propose alternatives
  docs: media: mediactl: use TOC instead of file contents
  docs: media: rc: use TOC instead of file contents for LIRC header
  docs: media: dvb: enable warnings for most headers
  docs: media: dvb: use TOC instead of file contents at headers
  tools: docs: parse_data_structs.py: accept more reftypes
  tools: docs: parse_data_structs.py: add namespace support
  tools: docs: parse_data_structs.py: get rid of process_exceptions()
  tools: docs: parse_data_structs: make process_exceptions two stages
  docs: kernel_include.py: propose alternatives
  ...

8 weeks agodocs: media: dvb: fix dmx.h.rst.exceptions
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:46 +0000 (16:49 +0200)] 
docs: media: dvb: fix dmx.h.rst.exceptions

There are lots of broken links on dmx. Those are mostly linked
to namespace handling.

Yet, some symbols were pointed to the wrong locations, and there
are some definitions that aren't needed.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b2acf243771529daa925afddd2b68d07d7bbb164.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: dvb: headers: warn about broken cross references
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:45 +0000 (16:49 +0200)] 
docs: media: dvb: headers: warn about broken cross references

Enable cross-reference warnings for demux header.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <8f98dde399df8b937dadf09168194bacce682c7d.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: dmx_types: place kerneldoc at the right namespace
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:44 +0000 (16:49 +0200)] 
docs: media: dmx_types: place kerneldoc at the right namespace

The DVB documentation is using DTV.dmx for all demux symbols.

Use such domain for kernel-doc documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <27fcc036fb5c80bda8116029e1964ad229208095.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: cec: show broken xrefs and show TOC instead of cec.h content
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:43 +0000 (16:49 +0200)] 
docs: cec: show broken xrefs and show TOC instead of cec.h content

Enable xref broken warnings. While here, change the output to
only show cross-references, as there's no need to show the entire cec.h
header at the docs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c587872ca3685213d9f8e88277404c9e253633df.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: cec: cec.h.rst.exceptions: fix broken references from cec.h
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:42 +0000 (16:49 +0200)] 
docs: cec: cec.h.rst.exceptions: fix broken references from cec.h

All references there belong to CEC namespace.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dd1270dd5d91538cdfb0b087127c53a9f4ba7885.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agomedia: docs: add some C domain missing references
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:41 +0000 (16:49 +0200)] 
media: docs: add some C domain missing references

Some enum/struct fields don't contain C domain references.
Add them to avoid broken xrefs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <c9b036938197f1dd5bc93f5c5be0245bd9e5d1ee.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agomedia: docs: videodev2.h.rst.exceptions: ignore struct __kernel_v4l2_timeval
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:40 +0000 (16:49 +0200)] 
media: docs: videodev2.h.rst.exceptions: ignore struct __kernel_v4l2_timeval

This is an ancillary struct used for year-2038 compat logic.
It is not meant to be used directly on userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <a6a0dc7366b1a5d7184b8f7d4ba27689051a1f6a.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agomedia: docs: add a missing reference for VIDIOC_QUERY_CTRL
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:39 +0000 (16:49 +0200)] 
media: docs: add a missing reference for VIDIOC_QUERY_CTRL

This one is missing its c:macro definition.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <46f86be6ace28abe83ea9ce6fa6138e40185a23a.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: videodev2.h.rst.exceptions: fix namespace on refs
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:38 +0000 (16:49 +0200)] 
docs: media: videodev2.h.rst.exceptions: fix namespace on refs

Media uses V4L domain, but the replace rules are not considering
it.

Fix them.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <927f9c19d90b62ffda950cdac9bba23c2ca09f53.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: add missing c namespace to V4L headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:37 +0000 (16:49 +0200)] 
docs: media: add missing c namespace to V4L headers

Media references belong to V4L namespace. Fix a lot of broken
links when including videodev2.h and probably fixing several
other broken cross-references between different files inside
media docs.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <b69fc5bd43da7d326b9f4720df59388088c64065.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: kernel_include.py: use get_close_matches() to propose alternatives
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:36 +0000 (16:49 +0200)] 
docs: kernel_include.py: use get_close_matches() to propose alternatives

Improve the suggestions algorithm by using get_close_matches() if
no suggestions with the same name are found. As we're now building
a dict, when the name is identical, but on a different domain,
the search is O(1), making it a lot faster.

The get_close_matches is also fast, as there is just one loop,
instead of 3.

This can be useful to detect typos on references, with could
be the base of a futuere extension that will handle ref unmatches
for the entire build, allowing someone to find typos and fix them.

As difflib and get_close_matches are there since the early
Python 3.x days, we don't need to handle any extra dependencies
to use it.

We're keeping the default values for the search, e.g. n=3, cutoff=0.6.
With that, we now have things like:

  $ make SPHINXDIRS="userspace-api/media" htmldocs
  ...
  include/uapi/linux/videodev2.h:199: WARNING: Invalid xref: c:type:`v4l2_memory`. Possible alternatives:
        c:type:`v4l2_meta_format` (from v4l/dev-meta)
        c:type:`v4l2_rect` (from v4l/dev-overlay)
        c:type:`v4l2_area` (from v4l/ext-ctrls-image-source) [ref.missing]
  ...
  include/uapi/linux/videodev2.h:1985: WARNING: Invalid xref: c:type:`V4L.v4l2_queryctrl`. Possible alternatives:
        std:label:`v4l2-queryctrl` (from v4l/vidioc-queryctrl)
        std:label:`v4l2-query-ext-ctrl` (from v4l/vidioc-queryctrl)

At the first example, it was not a typo, but a symbol that doesn't
seem to be properly documented. The second example points to
v4l2-queryctrl, which is a close match for the symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <7365feb74cbdd6b982c87baf5863360ab98cf727.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: mediactl: use TOC instead of file contents
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:35 +0000 (16:49 +0200)] 
docs: media: mediactl: use TOC instead of file contents

All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.

Use the new :toc: flag for media controller and enable warnings.

Here, we need to adjust the exceptions file to setup the C
namespace accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5c8a87be712397563fc8ca914c3d92fe675e4071.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: rc: use TOC instead of file contents for LIRC header
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:34 +0000 (16:49 +0200)] 
docs: media: rc: use TOC instead of file contents for LIRC header

All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.

Use the new :toc: flag for LIRC and enable warnings.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <94dc601b4777ca544489ffc6cef9a2da5fe28e0e.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: dvb: enable warnings for most headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:33 +0000 (16:49 +0200)] 
docs: media: dvb: enable warnings for most headers

Except for two exception rules and dmx.h, the other files
are already handling properly cross references.

Fix the two exception rules for frontend.h, as those are
false-positives:

include/uapi/linux/dvb/frontend.h:959: WARNING: can't link to: c:type:: FE_GET_PROPERTY
include/uapi/linux/dvb/frontend.h:933: WARNING: can't link to: c:func:: FE_SET_FRONTEND_TUNE_MODE

The dmx.h are actual issues that will require an extra
patch to fill gaps.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <9ae6556ebd47de4f066a149ab0bbe7ce27acf2c4.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: media: dvb: use TOC instead of file contents at headers
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:32 +0000 (16:49 +0200)] 
docs: media: dvb: use TOC instead of file contents at headers

All we wanted were to have a way to link the comprehensive
documentation with the actual symbols parsed from the header
file, as this helps to identify any broken references.

Use the new :toc: flag for DVB.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dbe95d83ae2117ed532fda423fd1c1d9906b7a19.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs.py: accept more reftypes
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:31 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs.py: accept more reftypes

Current regex is limited to only some c-domain reftypes.
There are several others.

Change the code to pick the name specified there.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <5c146923d1e3183893f290216fb1378954e2e540.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs.py: add namespace support
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:30 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs.py: add namespace support

C domain supports a ".. c:namespace::" tag that allows setting a
symbol namespace. This is used within the kernel to avoid warnings
about duplicated symbols. This is specially important for syscalls,
as each subsystem may have their own documentation for them.
This is specially true for ioctl.

When such tag is used, all C domain symbols have c++ style,
e.g. they'll become "{namespace}.{reference}".

Allow specifying C namespace at the exception files, avoiding
the need of override rules for every symbol.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <cc27ec60ceb3bdac4197fb7266d2df8155edacda.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs.py: get rid of process_exceptions()
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:29 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs.py: get rid of process_exceptions()

Add an extra parameter to parse_file to make it handle exceptions
internally, cleaning up the API.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <8575bbc94ff706aa7e7cc3a188399ca17a3169e6.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs: make process_exceptions two stages
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:28 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs: make process_exceptions two stages

Split the logic which parses exceptions on two stages, preparing
the exceptions file to have rules that will affect xref generation.

For now, preserve the original API.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <da9ca5f2ce1ffcfb355e32e676ff013607c227e0.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: kernel_include.py: propose alternatives
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:27 +0000 (16:49 +0200)] 
docs: kernel_include.py: propose alternatives

Specially when using c::namespace, it is not hard to break
a reference by forgetting to add a domain. Also, different
cases and using "-"/"_" the wrong way are typical cases that
people often gets wrong.

We might use a more complex logic here to also check for typos,
but let's keep it plain, simple.

This is enough to get thos exeptions from media controller:

  .../include/uapi/linux/media.h:26: WARNING: Invalid xref: c:type:`media_device_info`. Possible alternatives:
c:type:`MC.media_device_info` (from mediactl/media-ioc-device-info)
  .../include/uapi/linux/media.h:149: WARNING: Invalid xref: c:type:`media_entity_desc`. Possible alternatives:
c:type:`MC.media_entity_desc` (from mediactl/media-ioc-enum-entities)
  .../include/uapi/linux/media.h:228: WARNING: Invalid xref: c:type:`media_link_desc`. Possible alternatives:
c:type:`MC.media_link_desc` (from mediactl/media-ioc-enum-links)
  .../include/uapi/linux/media.h:235: WARNING: Invalid xref: c:type:`media_links_enum`. Possible alternatives:
c:type:`MC.media_links_enum` (from mediactl/media-ioc-enum-links)
  .../include/uapi/linux/media.h:212: WARNING: Invalid xref: c:type:`media_pad_desc`. Possible alternatives:
c:type:`MC.media_pad_desc` (from mediactl/media-ioc-enum-links)
  .../include/uapi/linux/media.h:298: WARNING: Invalid xref: c:type:`media_v2_entity`. Possible alternatives:
c:type:`MC.media_v2_entity` (from mediactl/media-ioc-g-topology)
  .../include/uapi/linux/media.h:312: WARNING: Invalid xref: c:type:`media_v2_interface`. Possible alternatives:
c:type:`MC.media_v2_interface` (from mediactl/media-ioc-g-topology)
  .../include/uapi/linux/media.h:307: WARNING: Invalid xref: c:type:`media_v2_intf_devnode`. Possible alternatives:
c:type:`MC.media_v2_intf_devnode` (from mediactl/media-ioc-g-topology)
  .../include/uapi/linux/media.h:341: WARNING: Invalid xref: c:type:`media_v2_link`. Possible alternatives:
c:type:`MC.media_v2_link` (from mediactl/media-ioc-g-topology)
  .../include/uapi/linux/media.h:333: WARNING: Invalid xref: c:type:`media_v2_pad`. Possible alternatives:
c:type:`MC.media_v2_pad` (from mediactl/media-ioc-g-topology)
  .../include/uapi/linux/media.h:349: WARNING: Invalid xref: c:type:`media_v2_topology`. Possible alternatives:
c:type:`MC.media_v2_topology` (from mediactl/media-ioc-g-topology)

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <4c75d277e950e619ea00ba2dea336853a4aac976.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agodocs: kernel_include.py: fix line numbers for TOC
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:26 +0000 (16:49 +0200)] 
docs: kernel_include.py: fix line numbers for TOC

On TOC output, we need to embeed line numbers with ViewList.

Change the parse class to produce a line-number parsed result,
and adjust the output accordingly.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <74eed96e32f79eaaef7a99ffe7c3224fed369c27.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs.py: output a line number
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:25 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs.py: output a line number

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <dcffa6844dede00052f5fb851a857991468f22b5.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agotools: docs: parse_data_structs.py: drop contents header
Mauro Carvalho Chehab [Wed, 1 Oct 2025 14:49:24 +0000 (16:49 +0200)] 
tools: docs: parse_data_structs.py: drop contents header

When used in practice, one may want to have multiple header
files on a single rst file, like:

***********************
Digital TV uAPI symbols
***********************

.. contents:: Table of Contents
   :depth: 2
   :local:

Frontend
========

.. kernel-include:: include/uapi/linux/dvb/frontend.h
    :generate-cross-refs:
    :toc:

Demux
=====

.. kernel-include:: include/uapi/linux/dvb/dmx.h
    :generate-cross-refs:
    :toc:

...

So, don't add ..contents:: here.

Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Message-ID: <4bf353e5248133a3b0abd82519a38453402fe7c6.1759329363.git.mchehab+huawei@kernel.org>

8 weeks agomedia: v4l2-mem2mem: Don't copy frame flags in v4l2_m2m_buf_copy_metadata()
Laurent Pinchart [Wed, 15 Oct 2025 10:01:16 +0000 (13:01 +0300)] 
media: v4l2-mem2mem: Don't copy frame flags in v4l2_m2m_buf_copy_metadata()

The v4l2_m2m_buf_copy_metadata() function takes a boolean
copy_frame_flags argument. When true, it causes the function to copy the
V4L2_BUF_FLAG_KEYFRAME, V4L2_BUF_FLAG_BFRAME and V4L2_BUF_FLAG_PFRAME
flags from the output buffer to the capture buffer.

There is no use cases in any upstream driver for copying the flags.
KEY/P/B frames are properties of the bitstream buffer in some formats.
Once decoded, this is no longer a property of the video frame and should
be discarded.

It was considered useful to know if an uncompressed frame was decoded
from a KEY/P/B compressed frame, and to preserve that information if
that same uncompressed frame was passed through another M2M device (e.g.
a scaler). However, the V4L2 documentation makes it clear that the flags
are meant for compressed frames only.

Drop the copy_frame_flags argument from v4l2_m2m_buf_copy_metadata().
The change to drivers was performed with the following Coccinelle
semantic patch:

@@
expression src;
expression dst;
expression flag;
@@
-       v4l2_m2m_buf_copy_metadata(src, dst, flag);
+       v4l2_m2m_buf_copy_metadata(src, dst);

include/media/v4l2-mem2mem.h and drivers/media/v4l2-core/v4l2-mem2mem.c
have been updated manually.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Benjamin Gaignard <benjamin.gaignard@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: staging/ipu7: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:12 +0000 (14:15 +0000)] 
media: staging/ipu7: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./ipu7/ipu7-isys-csi-phy.c:311:23-30: WARNING: Consider using %pe to print PTR_ERR()
./ipu7/ipu7-isys-csi2.c:59:22-29: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: staging: ipu3-imgu: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:11 +0000 (14:15 +0000)] 
media: staging: ipu3-imgu: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./ipu3/ipu3.c:534:5-12: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ti: cal Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:10 +0000 (14:15 +0000)] 
media: ti: cal Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/ti/cal/cal.c:1111:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: samsung: exynos4-is: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:09 +0000 (14:15 +0000)] 
media: samsung: exynos4-is: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/samsung/exynos4-is/media-dev.c:1337:16-23: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: rkisp1: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:08 +0000 (14:15 +0000)] 
media: rkisp1: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/rockchip/rkisp1/rkisp1-isp.c:940:3-10: WARNING: Consider using %pe to print PTR_ERR()
./platform/rockchip/rkisp1/rkisp1-csi.c:372:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: renesas: vsp1: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:07 +0000 (14:15 +0000)] 
media: renesas: vsp1: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/renesas/vsp1/vsp1_drv.c:958:4-11: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: platform: rzg2l-cru: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:06 +0000 (14:15 +0000)] 
media: platform: rzg2l-cru: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/renesas/rzg2l-cru/rzg2l-csi2.c:307:30-37: WARNING: Consider using %pe to print PTR_ERR()
./platform/renesas/rzg2l-cru/rzg2l-csi2.c:726:30-37: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: imx8mq-mipi-csi2: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:05 +0000 (14:15 +0000)] 
media: imx8mq-mipi-csi2: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/nxp/imx8mq-mipi-csi2.c:422:23-30: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Martin Kepplinger-Novakovic <martink@posteo.de>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: mediatek: vcodec: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:04 +0000 (14:15 +0000)] 
media: mediatek: vcodec: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./platform/mediatek/vcodec/common/mtk_vcodec_dbgfs.c:187:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ipu6: isys: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:03 +0000 (14:15 +0000)] 
media: ipu6: isys: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./pci/intel/ipu6/ipu6-isys-csi2.c:91:22-29: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ipu3-cio2: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:02 +0000 (14:15 +0000)] 
media: ipu3-cio2: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./pci/intel/ipu3/ipu3-cio2.c:318:19-26: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ipu-bridge: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:01 +0000 (14:15 +0000)] 
media: ipu-bridge: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./pci/intel/ipu-bridge.c:567:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: st-mipid02: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:15:00 +0000 (14:15 +0000)] 
media: i2c: st-mipid02: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/st-mipid02.c:751:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: rj54n1cb0c: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:59 +0000 (14:14 +0000)] 
media: rj54n1cb0c: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/rj54n1cb0c.c:1361:4-11: WARNING: Consider using %pe to print PTR_ERR()
./i2c/rj54n1cb0c.c:1370:4-11: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: ov9282: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:58 +0000 (14:14 +0000)] 
media: i2c: ov9282: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ov9282.c:1133:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: ov5693: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:57 +0000 (14:14 +0000)] 
media: i2c: ov5693: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ov5693.c:1296:9-16: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: ov5675: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:56 +0000 (14:14 +0000)] 
media: i2c: ov5675: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ov5675.c:1188:9-16: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: mt9v111: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:55 +0000 (14:14 +0000)] 
media: i2c: mt9v111: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/mt9v111.c:1143:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/mt9v111.c:1151:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/mt9v111.c:1159:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: mt9m111: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:54 +0000 (14:14 +0000)] 
media: i2c: mt9m111: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/mt9m111.c:1290:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: max96717: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:53 +0000 (14:14 +0000)] 
media: i2c: max96717: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/max96717.c:653:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: max9286: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:52 +0000 (14:14 +0000)] 
media: i2c: max9286: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/max9286.c:755:7-14: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: imx412: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:51 +0000 (14:14 +0000)] 
media: i2c: imx412: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx412.c:931:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: imx335: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:50 +0000 (14:14 +0000)] 
media: i2c: imx335: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx335.c:1013:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: imx274: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:49 +0000 (14:14 +0000)] 
media: i2c: imx274: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/imx274.c:2038:32-39: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: ds90ub953: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:48 +0000 (14:14 +0000)] 
media: i2c: ds90ub953: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ds90ub953.c:779:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: i2c: ds90ub913: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:47 +0000 (14:14 +0000)] 
media: i2c: ds90ub913: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR().

This patch fixes this cocci report:
./i2c/ds90ub913.c:625:44-51: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ccs: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:46 +0000 (14:14 +0000)] 
media: ccs: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/ccs/ccs-core.c:3241:3-10: WARNING: Consider using %pe to print PTR_ERR()
./i2c/ccs/ccs-core.c:3298:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ar0521: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:45 +0000 (14:14 +0000)] 
media: ar0521: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/ar0521.c:1113:31-38: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Krzysztof Hałasa <khalasa@piap.pl>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: adv7842: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:44 +0000 (14:14 +0000)] 
media: adv7842: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./i2c/adv7842.c:3470:16-23: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: mn88443x: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:43 +0000 (14:14 +0000)] 
media: mn88443x: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./dvb-frontends/mn88443x.c:698:3-10: WARNING: Consider using %pe to print PTR_ERR()
./dvb-frontends/mn88443x.c:713:3-10: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: dvbdev: Use %pe format specifier
Ricardo Ribalda [Mon, 13 Oct 2025 14:14:42 +0000 (14:14 +0000)] 
media: dvbdev: Use %pe format specifier

The %pe format specifier is designed to print error pointers. It prints
a symbolic error name (eg. -EINVAL) and it makes the code simpler by
omitting PTR_ERR()

This patch fixes this cocci report:
./dvb-core/dvbdev.c:575:48-55: WARNING: Consider using %pe to print PTR_ERR()

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: vim2m: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:48 +0000 (10:53 +0300)] 
media: vim2m: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: vicodec: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:47 +0000 (10:53 +0300)] 
media: vicodec: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: ti: vpe: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:46 +0000 (10:53 +0300)] 
media: ti: vpe: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: stm32: dma2d: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:45 +0000 (10:53 +0300)] 
media: stm32: dma2d: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check was
probably intended to catch invalid format types, but that's not needed
as the V4L2 core picks the appropriate VIDIOC_G_FMT ioctl handler based
on the format type, so the type can't be incorrect. Drop the unneeded
return value check and, as the return value is not used for other
purposes and the function has no side effect, the function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: samsung: s5p-jpeg: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:44 +0000 (10:53 +0300)] 
media: samsung: s5p-jpeg: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value check and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Andrzej Pietrasiewicz <andrzejtp2010@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: samsung: s5p-g2d: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:43 +0000 (10:53 +0300)] 
media: samsung: s5p-g2d: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check was
probably intended to catch invalid format types, but that's not needed
as the V4L2 core picks the appropriate VIDIOC_G_FMT ioctl handler based
on the format type, so the type can't be incorrect. Drop the unneeded
return value check and, as the return value is not used for other
purposes and the function has no side effect, the function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Łukasz Stelmach <l.stelmach@samsung.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: platform: rga: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:42 +0000 (10:53 +0300)] 
media: platform: rga: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check was
probably intended to catch invalid format types, but that's not needed
as the V4L2 core picks the appropriate VIDIOC_G_FMT ioctl handler based
on the format type, so the type can't be incorrect. Drop the unneeded
return value check and, as the return value is not used for other
purposes and the function has no side effect, the function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: rcar_jpu: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:41 +0000 (10:53 +0300)] 
media: rcar_jpu: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get and try format handlers, the return value is not used for any
purpose other than the NULL check, which was therefore probably intended
to catch invalid format types. That's not needed for the same reason as
in the set format handler.

Drop the unneeded return value check and, as the function has no side
effect, the unneeded function calls as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: renesas: fdp1: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:40 +0000 (10:53 +0300)] 
media: renesas: fdp1: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check was
probably intended to catch invalid format types, but that's not needed
as the V4L2 core picks the appropriate VIDIOC_G_FMT ioctl handler based
on the format type, so the type can't be incorrect. Drop the unneeded
return value check and, as the function has no side effect, the function
call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: qcom: venus: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:39 +0000 (10:53 +0300)] 
media: qcom: venus: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check may have
been intended to catch invalid format types, but that's not needed as
the V4L2 core picks the appropriate VIDIOC_S_FMT ioctl handler based on
the format type, so the type can't be incorrect. Drop the unneeded
return value check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: qcom: iris: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:38 +0000 (10:53 +0300)] 
media: qcom: iris: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check may have
been intended to catch invalid format types, but that's not needed as
the V4L2 core picks the appropriate VIDIOC_S_FMT ioctl handler based on
the format type, so the type can't be incorrect. Drop the unneeded
return value check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: Dikshita Agarwal <dikshita.agarwal@oss.qualcomm.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: mx2_emmaprp: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:37 +0000 (10:53 +0300)] 
media: mx2_emmaprp: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: nxp: imx8-isi: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:36 +0000 (10:53 +0300)] 
media: nxp: imx8-isi: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check may have
been intended to catch invalid format types, but that's not needed as
the V4L2 core picks the appropriate VIDIOC_S_FMT ioctl handler based on
the format type, so the type can't be incorrect. Drop the unneeded
return value check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: imx-pxp: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:35 +0000 (10:53 +0300)] 
media: imx-pxp: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: imx-jpeg: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:34 +0000 (10:53 +0300)] 
media: imx-jpeg: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL. The check may have
been intended to catch invalid format types, but that's not needed as
the V4L2 core picks the appropriate VIDIOC_S_FMT ioctl handler based on
the format type, so the type can't be incorrect. Drop the unneeded
return value check.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: dw100: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:33 +0000 (10:53 +0300)] 
media: dw100: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handler, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handler, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
8 weeks agomedia: mediatek: vcodec: Drop unneeded v4l2_m2m_get_vq() NULL check
Laurent Pinchart [Wed, 15 Oct 2025 07:53:32 +0000 (10:53 +0300)] 
media: mediatek: vcodec: Drop unneeded v4l2_m2m_get_vq() NULL check

The v4l2_m2m_get_vq() function never returns NULL.

In the set format handlers, the check may have been intended to catch
invalid format types, but that's not needed as the V4L2 core picks the
appropriate VIDIOC_S_FMT ioctl handler based on the format type, so the
type can't be incorrect.

In the get format handlers, the return value is not used for any purpose
other than the NULL check, which was therefore probably intended to
catch invalid format types. That's not needed for the same reason as in
the set format handler.

In other locations the v4l2_m2m_get_vq() function is called with a
hardcoded V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE type, so the NULL check
can't have been an attempt to catch an invalid type there either.

Drop the unneeded return value checks and, as the function has no side
effect, the unneeded function call as well.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>