Skip to contentSkip to conversation

Bluetooth: hci_qca: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

PATCH In review Triet Hoang 3 participants 4 messages Aug 20 – Sep 10

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

PATCH 1/1 Bluetooth: hci_qca: Convert to DEFINE_SIMPLE_DEV_PM_OPS()

Convert the deprecated SIMPLE_DEV_PM_OPS
to DEFINE_SIMPLE_DEV_PM_OPS and pm_sleep_ptr().

This lets us drop the __maybe_unused annotations from its suspend and resume callbacks, and reduces kernel size in case CONFIG_PM or CONFIG_PM_SLEEP is disabled.

---
 drivers/bluetooth/hci_qca.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/bluetooth/hci_qca.c +4 -4
index 1222f97800f4..859b13814ff6 100644
@@ -2643,7 +2643,7 @@ static void qca_serdev_shutdown(struct serdev_device *serdev)
 	}
 }
 
-static int __maybe_unused qca_suspend(struct device *dev)
+static int qca_suspend(struct device *dev)
 {
 	struct serdev_device *serdev = to_serdev_device(dev);
 	struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
@@ -2757,7 +2757,7 @@ static int __maybe_unused qca_suspend(struct device *dev)
 	return ret;
 }
 
-static int __maybe_unused qca_resume(struct device *dev)
+static int qca_resume(struct device *dev)
 {
 	struct serdev_device *serdev = to_serdev_device(dev);
 	struct qca_serdev *qcadev = serdev_device_get_drvdata(serdev);
@@ -2769,7 +2769,7 @@ static int __maybe_unused qca_resume(struct device *dev)
 	return 0;
 }
 
-static SIMPLE_DEV_PM_OPS(qca_pm_ops, qca_suspend, qca_resume);
+static DEFINE_SIMPLE_DEV_PM_OPS(qca_pm_ops, qca_suspend, qca_resume);
 
 #ifdef CONFIG_OF
 static const struct of_device_id qca_bluetooth_of_match[] = {
@@ -2823,7 +2823,7 @@ static struct serdev_device_driver qca_serdev_driver = {
 		.name = "hci_uart_qca",
 		.of_match_table = of_match_ptr(qca_bluetooth_of_match),
 		.acpi_match_table = ACPI_PTR(qca_bluetooth_acpi_match),
-		.pm = &qca_pm_ops,
+		.pm = pm_sleep_ptr(&qca_pm_ops),
 #ifdef CONFIG_DEV_COREDUMP
 		.coredump = hciqca_coredump,
 #endif
Signature · 1 line
2.53.0
#1 lore raw

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/project/bluetooth/list/?series=1148805

---Test result---

Test Summary:

CheckPatch                    PASS      0.93 seconds
VerifyFixes                   PASS      0.10 seconds
VerifySignedoff               PASS      0.10 seconds
GitLint                       PASS      0.27 seconds
SubjectPrefix                 PASS      0.09 seconds
BuildKernel                   PASS      28.72 seconds
CheckAllWarning               PASS      32.28 seconds
CheckSparse                   PASS      30.49 seconds
BuildKernel32                 PASS      28.02 seconds
CheckKernelLLVM               SKIP      0.00 seconds
TestRunnerSetup               PASS      521.26 seconds
IncrementalBuild              PASS      26.80 seconds

Details
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found

https://github.com/bluez/bluetooth-next/pull/621

---
Regards,
Linux Bluetooth

#3 lore raw
In reply to Triet Hoang

This is automated email and please do not reply to this email!

Dear submitter,

Thank you for submitting the patches to the linux bluetooth mailing list. This is a CI test results with your patch series:
PW Link:https://patchwork.kernel.org/series/1148805/

---Test result---

Test Summary:

CheckPatch                    PASS      0.50 seconds
VerifyFixes                   PASS      0.08 seconds
VerifySignedoff               PASS      0.07 seconds
GitLint                       PASS      0.21 seconds
SubjectPrefix                 PASS      0.07 seconds
BuildKernel                   PASS      21.50 seconds
CheckAllWarning               PASS      27.36 seconds
CheckSparse                   PASS      27.33 seconds
BuildKernel32                 PASS      21.74 seconds
CheckKernelLLVM               PASS      25.34 seconds
TestRunnerSetup               PASS      566.23 seconds
IncrementalBuild              PASS      21.36 seconds

https://github.com/bluez/bluetooth-next/pull/736

---
Regards,
Linux Bluetooth