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: <aSb6MSAoG68EmnLq@black.igk.intel.com>
Date: Wed, 26 Nov 2025 14:01:37 +0100
From: Andy Shevchenko <andriy.shevchenko@...el.com>
To: Praveen Talari <praveen.talari@....qualcomm.com>
Cc: Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konradybcio@...nel.org>,
	Rob Herring <robh@...nel.org>,
	Krzysztof Kozlowski <krzk+dt@...nel.org>,
	Conor Dooley <conor+dt@...nel.org>,
	Linus Walleij <linus.walleij@...aro.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	Jiri Slaby <jirislaby@...nel.org>,
	Dmitry Baryshkov <lumag@...nel.org>, linux-arm-msm@...r.kernel.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-gpio@...r.kernel.org, linux-serial@...r.kernel.org,
	alexey.klimov@...aro.org, krzk@...nel.org,
	bryan.odonoghue@...aro.org, jorge.ramirez@....qualcomm.com,
	dmitry.baryshkov@....qualcomm.com,
	Konrad Dybcio <konrad.dybcio@....qualcomm.com>,
	psodagud@...cinc.com, djaggi@...cinc.com, quic_msavaliy@...cinc.com,
	quic_vtanuku@...cinc.com, quic_arandive@...cinc.com,
	quic_shazhuss@...cinc.com, quic_cchiluve@...cinc.com
Subject: Re: [PATCH v1 3/4] serial: qcom-geni: Enable PM runtime for serial
 driver

On Mon, Nov 10, 2025 at 03:40:42PM +0530, Praveen Talari wrote:
> The GENI serial driver currently handles power resource management
> through calls to the statically defined geni_serial_resources_on() and
> geni_serial_resources_off() functions. This approach reduces modularity
> and limits support for platforms with diverse power management
> mechanisms, including resource managed by firmware.
> 
> Improve modularity and enable better integration with platform-specific
> power management, introduce support for runtime PM. Use
> pm_runtime_resume_and_get() and pm_runtime_put_sync() within the
> qcom_geni_serial_pm() callback to control resource power state
> transitions based on UART power state changes.

...

> +	devm_pm_runtime_enable(port->se.dev);

First of all, this misses the error check.

> +static int __maybe_unused qcom_geni_serial_runtime_suspend(struct device *dev)

Second, we have a new (already like 2+ years) approach, so, drop __maybe_unused
and try not to add more in a new code.

...

> +static int __maybe_unused qcom_geni_serial_runtime_resume(struct device *dev)

Ditto.

...

>  static const struct dev_pm_ops qcom_geni_serial_pm_ops = {
> +	SET_RUNTIME_PM_OPS(qcom_geni_serial_runtime_suspend,
> +			   qcom_geni_serial_runtime_resume, NULL)
>  	SYSTEM_SLEEP_PM_OPS(qcom_geni_serial_suspend, qcom_geni_serial_resume)
>  };

Please, do not use deprecated macros, switch to new ones in conjunction with
pm_ptr() at the PM ops assignment below.

...

Since it's going to be applied, I think, send a followup to fix this.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ