* [PATCH] Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS
@ 2024-11-22 13:59 Fabio Estevam
2024-11-22 14:31 ` bluez.test.bot
2024-11-26 13:47 ` [PATCH] " Neeraj Sanjay Kale
0 siblings, 2 replies; 3+ messages in thread
From: Fabio Estevam @ 2024-11-22 13:59 UTC (permalink / raw)
To: luiz.dentz
Cc: amitkumar.karwar, neeraj.sanjaykale, marcel, linux-bluetooth,
linux-kernel, Fabio Estevam
From: Fabio Estevam <festevam@denx.de>
Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS()
alternative.
The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows
the compiler to evaluate if the suspend/resume() functions
are used at build time or are simply dead code.
This allows removing the CONFIG_PM_SLEEP ifdefery from the
suspend/resume() functions.
Signed-off-by: Fabio Estevam <festevam@denx.de>
---
drivers/bluetooth/btnxpuart.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
index 569f5b7d6e46..06c1093c70ab 100644
--- a/drivers/bluetooth/btnxpuart.c
+++ b/drivers/bluetooth/btnxpuart.c
@@ -1588,7 +1588,6 @@ static void nxp_serdev_remove(struct serdev_device *serdev)
hci_free_dev(hdev);
}
-#ifdef CONFIG_PM_SLEEP
static int nxp_serdev_suspend(struct device *dev)
{
struct btnxpuart_dev *nxpdev = dev_get_drvdata(dev);
@@ -1606,7 +1605,6 @@ static int nxp_serdev_resume(struct device *dev)
ps_control(psdata->hdev, PS_STATE_AWAKE);
return 0;
}
-#endif
static struct btnxpuart_data w8987_data __maybe_unused = {
.helper_fw_name = NULL,
@@ -1628,7 +1626,7 @@ static const struct of_device_id nxpuart_of_match_table[] __maybe_unused = {
MODULE_DEVICE_TABLE(of, nxpuart_of_match_table);
static const struct dev_pm_ops nxp_pm_ops = {
- SET_SYSTEM_SLEEP_PM_OPS(nxp_serdev_suspend, nxp_serdev_resume)
+ SYSTEM_SLEEP_PM_OPS(nxp_serdev_suspend, nxp_serdev_resume)
};
static struct serdev_device_driver nxp_serdev_driver = {
@@ -1637,7 +1635,7 @@ static struct serdev_device_driver nxp_serdev_driver = {
.driver = {
.name = "btnxpuart",
.of_match_table = of_match_ptr(nxpuart_of_match_table),
- .pm = &nxp_pm_ops,
+ .pm = pm_sleep_ptr(&nxp_pm_ops),
},
};
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* RE: Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS
2024-11-22 13:59 [PATCH] Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS Fabio Estevam
@ 2024-11-22 14:31 ` bluez.test.bot
2024-11-26 13:47 ` [PATCH] " Neeraj Sanjay Kale
1 sibling, 0 replies; 3+ messages in thread
From: bluez.test.bot @ 2024-11-22 14:31 UTC (permalink / raw)
To: linux-bluetooth, festevam
[-- Attachment #1: Type: text/plain, Size: 2171 bytes --]
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=911801
---Test result---
Test Summary:
CheckPatch PENDING 0.43 seconds
GitLint PENDING 0.26 seconds
SubjectPrefix PASS 0.07 seconds
BuildKernel PASS 24.91 seconds
CheckAllWarning PASS 27.57 seconds
CheckSparse PASS 30.16 seconds
BuildKernel32 PASS 28.02 seconds
TestRunnerSetup PASS 434.25 seconds
TestRunner_l2cap-tester PASS 20.16 seconds
TestRunner_iso-tester FAIL 34.34 seconds
TestRunner_bnep-tester PASS 4.81 seconds
TestRunner_mgmt-tester FAIL 121.11 seconds
TestRunner_rfcomm-tester PASS 7.54 seconds
TestRunner_sco-tester PASS 13.50 seconds
TestRunner_ioctl-tester PASS 8.07 seconds
TestRunner_mesh-tester PASS 5.91 seconds
TestRunner_smp-tester PASS 6.91 seconds
TestRunner_userchan-tester PASS 4.95 seconds
IncrementalBuild PENDING 0.80 seconds
Details
##############################
Test: CheckPatch - PENDING
Desc: Run checkpatch.pl script
Output:
##############################
Test: GitLint - PENDING
Desc: Run gitlint
Output:
##############################
Test: TestRunner_iso-tester - FAIL
Desc: Run iso-tester with test-runner
Output:
WARNING: possible circular locking dependency detected
Total: 124, Passed: 120 (96.8%), Failed: 0, Not Run: 4
##############################
Test: TestRunner_mgmt-tester - FAIL
Desc: Run mgmt-tester with test-runner
Output:
Total: 492, Passed: 487 (99.0%), Failed: 1, Not Run: 4
Failed Test Cases
LL Privacy - Start Discovery 2 (Disable RL) Failed 0.202 seconds
##############################
Test: IncrementalBuild - PENDING
Desc: Incremental build with the patches in the series
Output:
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS
2024-11-22 13:59 [PATCH] Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS Fabio Estevam
2024-11-22 14:31 ` bluez.test.bot
@ 2024-11-26 13:47 ` Neeraj Sanjay Kale
1 sibling, 0 replies; 3+ messages in thread
From: Neeraj Sanjay Kale @ 2024-11-26 13:47 UTC (permalink / raw)
To: Fabio Estevam, luiz.dentz@gmail.com
Cc: Amitkumar Karwar, marcel@holtmann.org,
linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
Fabio Estevam, Sherry Sun, Luke Wang
Hi Fabio,
Thank you for the patch and the improvement it brings along.
Reviewed-by: Neeraj Sanjay Kale <neeraj.sanjaykale@nxp.com>
Thanks,
Neeraj
>
> From: Fabio Estevam <festevam@denx.de>
>
> Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern
> SYSTEM_SLEEP_PM_OPS() alternative.
>
> The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows
> the compiler to evaluate if the suspend/resume() functions are used at build
> time or are simply dead code.
>
> This allows removing the CONFIG_PM_SLEEP ifdefery from the
> suspend/resume() functions.
>
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
> drivers/bluetooth/btnxpuart.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/bluetooth/btnxpuart.c b/drivers/bluetooth/btnxpuart.c
> index 569f5b7d6e46..06c1093c70ab 100644
> --- a/drivers/bluetooth/btnxpuart.c
> +++ b/drivers/bluetooth/btnxpuart.c
> @@ -1588,7 +1588,6 @@ static void nxp_serdev_remove(struct
> serdev_device *serdev)
> hci_free_dev(hdev);
> }
>
> -#ifdef CONFIG_PM_SLEEP
> static int nxp_serdev_suspend(struct device *dev) {
> struct btnxpuart_dev *nxpdev = dev_get_drvdata(dev); @@ -1606,7
> +1605,6 @@ static int nxp_serdev_resume(struct device *dev)
> ps_control(psdata->hdev, PS_STATE_AWAKE);
> return 0;
> }
> -#endif
>
> static struct btnxpuart_data w8987_data __maybe_unused = {
> .helper_fw_name = NULL,
> @@ -1628,7 +1626,7 @@ static const struct of_device_id
> nxpuart_of_match_table[] __maybe_unused = { MODULE_DEVICE_TABLE(of,
> nxpuart_of_match_table);
>
> static const struct dev_pm_ops nxp_pm_ops = {
> - SET_SYSTEM_SLEEP_PM_OPS(nxp_serdev_suspend,
> nxp_serdev_resume)
> + SYSTEM_SLEEP_PM_OPS(nxp_serdev_suspend, nxp_serdev_resume)
> };
>
> static struct serdev_device_driver nxp_serdev_driver = { @@ -1637,7 +1635,7
> @@ static struct serdev_device_driver nxp_serdev_driver = {
> .driver = {
> .name = "btnxpuart",
> .of_match_table = of_match_ptr(nxpuart_of_match_table),
> - .pm = &nxp_pm_ops,
> + .pm = pm_sleep_ptr(&nxp_pm_ops),
> },
> };
>
> --
> 2.34.1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-11-26 13:47 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-22 13:59 [PATCH] Bluetooth: btnxpuart: Switch to SYSTEM_SLEEP_PM_OPS Fabio Estevam
2024-11-22 14:31 ` bluez.test.bot
2024-11-26 13:47 ` [PATCH] " Neeraj Sanjay Kale
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox