Skip to contentSkip to conversation

soc: ti: Fix PM disable depth imbalance in probe

PATCH Applied Zhang Qilong 2 participants 4 messages Nov 8, 2022 – Nov 15, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover soc: ti: Fix PM disable depth imbalance in probe

The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed when error returns to keep it balanced. This series of patches fixed it in probe to avoid the warning issue like "Unbalanced pm_runtime_enable!".

Zhang Qilong (2):
soc: ti: Fix PM disable depth imbalance in knav_queue_probe
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe

 drivers/soc/ti/knav_qmss_queue.c | 1 +
 drivers/soc/ti/smartreflex.c     | 1 +
 2 files changed, 2 insertions(+)
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw

PATCH 1/2 soc: ti: Fix PM disable depth imbalance in knav_queue_probe

The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.

Fixes 41f93af900a2 ("soc: ti: add Keystone Navigator QMSS driver")
---
 drivers/soc/ti/knav_qmss_queue.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/ti/knav_qmss_queue.c +1 -0
index 92af7d1b6f5b..3e2a9e4dacf1 100644
@@ -1785,6 +1785,7 @@ static int knav_queue_probe(struct platform_device *pdev)
 	pm_runtime_enable(&pdev->dev);
 	ret = pm_runtime_resume_and_get(&pdev->dev);
 	if (ret < 0) {
+		pm_runtime_disable(&pdev->dev);
 		dev_err(dev, "Failed to enable QMSS\n");
 		return ret;
 	}
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH 2/2 soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe

In reply to Zhang Qilong

The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed on the error handling path to keep it balanced according to context.

Fixes 984aa6dbf4ca ("OMAP3: PM: Adding smartreflex driver support.")
---
 drivers/soc/ti/smartreflex.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/ti/smartreflex.c +1 -0
index ad2bb72e640c..6a389a6444f3 100644
@@ -932,6 +932,7 @@ static int omap_sr_probe(struct platform_device *pdev)
 err_debugfs:
 	debugfs_remove_recursive(sr_info->dbg_dir);
 err_list_del:
+	pm_runtime_disable(&pdev->dev);
 	list_del(&sr_info->node);
 	clk_unprepare(sr_info->fck);
 
Signature · 7 lines
2.25.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#3 lore raw
In reply to Zhang Qilong

Hi Zhang Qilong,

Quoted 10 lines · Zhang Qilong

The pm_runtime_enable will increase power disable depth. Thus a pairing decrement is needed when error returns to keep it balanced. This series of patches fixed it in probe to avoid the warning issue like "Unbalanced pm_runtime_enable!".

Zhang Qilong (2):
soc: ti: Fix PM disable depth imbalance in knav_queue_probe
soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe

[...]

I have applied the following to branch ti-drivers-soc-next on [1]. Thank you!

[1/2] soc: ti: knav_qmss_queue: Fix PM disable depth imbalance in knav_queue_probe

      commit: e961c0f19450fd4a26bd043dd2979990bf12caf6
[2/2] soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
      commit: 69460e68eb662064ab4188d4e129ff31c1f23ed9

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] git://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 9 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel