lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6yvjiklxzxnlu6dxbp2pobpwgolomyqeqhuhhqax3kxccqirgr@x5ipfgxsbp6q>
Date:   Mon, 17 Jul 2023 16:18:56 +0200
From:   Jacopo Mondi <jacopo.mondi@...asonboard.com>
To:     Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
Cc:     linux-media@...r.kernel.org, linux-kernel@...r.kernel.org,
        Mauro Carvalho Chehab <mchehab@...nel.org>,
        Sakari Ailus <sakari.ailus@...ux.intel.com>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        Jacopo Mondi <jacopo.mondi@...asonboard.com>
Subject: Re: [PATCH 3/3] media: subdev: Add debug prints to
 enable/disable_streams

Hi Tomi

On Mon, Jun 19, 2023 at 02:27:07PM +0300, Tomi Valkeinen wrote:
> It is often useful to see when streaming for a device is being enabled
> or disabled. Add debug prints for this to v4l2_subdev_enable_streams()
> and v4l2_subdev_disable_streams().
>
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
> ---
>  drivers/media/v4l2-core/v4l2-subdev.c | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/v4l2-core/v4l2-subdev.c b/drivers/media/v4l2-core/v4l2-subdev.c
> index 73f716a42569..0f86a165b202 100644
> --- a/drivers/media/v4l2-core/v4l2-subdev.c
> +++ b/drivers/media/v4l2-core/v4l2-subdev.c
> @@ -1977,11 +1977,16 @@ int v4l2_subdev_enable_streams(struct v4l2_subdev *sd, u32 pad,
>  		goto done;
>  	}
>
> +	dev_dbg(dev, "enable streams %u:%#llx\n", pad, streams_mask);

With the use of the # incantation clarified offline:

Reviewed-by: Jacopo Mondi <jacopo.mondi@...asonboard.com>


> +
>  	/* Call the .enable_streams() operation. */
>  	ret = v4l2_subdev_call(sd, pad, enable_streams, state, pad,
>  			       streams_mask);
> -	if (ret)
> +	if (ret) {
> +		dev_dbg(dev, "enable streams %u:%#llx failed: %d\n", pad,
> +			streams_mask, ret);
>  		goto done;
> +	}
>
>  	/* Mark the streams as enabled. */
>  	for (i = 0; i < state->stream_configs.num_configs; ++i) {
> @@ -2089,11 +2094,16 @@ int v4l2_subdev_disable_streams(struct v4l2_subdev *sd, u32 pad,
>  		goto done;
>  	}
>
> +	dev_dbg(dev, "disable streams %u:%#llx\n", pad, streams_mask);
> +
>  	/* Call the .disable_streams() operation. */
>  	ret = v4l2_subdev_call(sd, pad, disable_streams, state, pad,
>  			       streams_mask);
> -	if (ret)
> +	if (ret) {
> +		dev_dbg(dev, "disable streams %u:%#llx failed: %d\n", pad,
> +			streams_mask, ret);
>  		goto done;
> +	}
>
>  	/* Mark the streams as disabled. */
>  	for (i = 0; i < state->stream_configs.num_configs; ++i) {
> --
> 2.34.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ