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: <20251223163010.GJ9817@pendragon.ideasonboard.com>
Date: Tue, 23 Dec 2025 18:30:10 +0200
From: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: "Rafael J. Wysocki" <rafael@...nel.org>
Cc: Linux PM <linux-pm@...r.kernel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Brian Norris <briannorris@...omium.org>,
	Dafna Hirschfeld <dafna@...tmail.com>,
	Mauro Carvalho Chehab <mchehab@...nel.org>,
	Heiko Stuebner <heiko@...ech.de>, linux-media@...r.kernel.org,
	linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH v1 05/23] media: rkisp1: Discard pm_runtime_put() return
 value

Hi Rafael,

Thank you for the patch.

On Mon, Dec 22, 2025 at 09:01:55PM +0100, Rafael J. Wysocki wrote:
> From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> 
> Printing error messages on pm_runtime_put() returning negative values
> is not particularly useful.
>  
> Returning an error code from pm_runtime_put() merely means that it has
> not queued up a work item to check whether or not the device can be
> suspended and there are many perfectly valid situations in which that
> can happen, like after writing "on" to the devices' runtime PM "control"
> attribute in sysfs for one example.
> 
> Accordingly, update rkisp1_vb2_stop_streaming() to simply discard the
> return value of pm_runtime_put().
> 
> This will facilitate a planned change of the pm_runtime_put() return
> type to void in the future.
> 
> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>

> ---
> 
> This patch is part of a series, but it doesn't depend on anything else
> in that series.  The last patch in the series depends on it.
> 
> It can be applied by itself and if you decide to do so, please let me
> know.

I've applied the patch to my tree for v6.20.

> Otherwise, an ACK or equivalent will be appreciated, but also the lack
> of specific criticism will be eventually regarded as consent.
> 
> ---
>  drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c |    5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
> +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c
> @@ -1123,7 +1123,6 @@ static void rkisp1_vb2_stop_streaming(st
>  	struct rkisp1_capture *cap = queue->drv_priv;
>  	struct rkisp1_vdev_node *node = &cap->vnode;
>  	struct rkisp1_device *rkisp1 = cap->rkisp1;
> -	int ret;
>  
>  	mutex_lock(&cap->rkisp1->stream_lock);
>  
> @@ -1132,9 +1131,7 @@ static void rkisp1_vb2_stop_streaming(st
>  	rkisp1_return_all_buffers(cap, VB2_BUF_STATE_ERROR);
>  
>  	v4l2_pipeline_pm_put(&node->vdev.entity);
> -	ret = pm_runtime_put(rkisp1->dev);
> -	if (ret < 0)
> -		dev_err(rkisp1->dev, "power down failed error:%d\n", ret);
> +	pm_runtime_put(rkisp1->dev);
>  
>  	rkisp1_dummy_buf_destroy(cap);
>  

-- 
Regards,

Laurent Pinchart

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ