* [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
@ 2026-08-19 5:45 Li Jun
2026-08-19 6:28 ` bluez.test.bot
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Li Jun @ 2026-08-19 5:45 UTC (permalink / raw)
To: lijun01, marcel, luiz.dentz, linux-bluetooth
use SIMPLE_DEV_PM_OPS for charlcd_pm_ops,and add the value of
.freeze .thaw .poweroff .restore.if these address are null, may cause
error in s4.
Signed-off-by: Li Jun <lijun01@kylinos.cn>
---
drivers/bluetooth/btmrvl_sdio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/bluetooth/btmrvl_sdio.c b/drivers/bluetooth/btmrvl_sdio.c
index b91fc63bc9fe..197237e78a3c 100644
--- a/drivers/bluetooth/btmrvl_sdio.c
+++ b/drivers/bluetooth/btmrvl_sdio.c
@@ -1726,10 +1726,7 @@ static int btmrvl_sdio_resume(struct device *dev)
return 0;
}
-static const struct dev_pm_ops btmrvl_sdio_pm_ops = {
- .suspend = btmrvl_sdio_suspend,
- .resume = btmrvl_sdio_resume,
-};
+SIMPLE_DEV_PM_OPS(btmrvl_sdio_pm_ops, btmrvl_sdio_suspend, btmrvl_sdio_resume);
static struct sdio_driver bt_mrvl_sdio = {
.name = "btmrvl_sdio",
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* RE: bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
2026-08-19 5:45 [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct Li Jun
@ 2026-08-19 6:28 ` bluez.test.bot
2026-08-21 15:34 ` [PATCH] " kernel test robot
2026-08-21 19:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: bluez.test.bot @ 2026-08-19 6:28 UTC (permalink / raw)
To: linux-bluetooth, lijun01
[-- Attachment #1: Type: text/plain, Size: 1348 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=1148208
---Test result---
Test Summary:
CheckPatch PASS 5.20 seconds
VerifyFixes PASS 1.09 seconds
VerifySignedoff PASS 0.48 seconds
GitLint PASS 0.87 seconds
SubjectPrefix FAIL 0.12 seconds
BuildKernel PASS 28.77 seconds
CheckAllWarning PASS 29.71 seconds
CheckSparse PASS 27.87 seconds
BuildKernel32 PASS 25.82 seconds
CheckKernelLLVM SKIP 0.00 seconds
TestRunnerSetup PASS 482.56 seconds
IncrementalBuild PASS 25.20 seconds
Details
##############################
Test: SubjectPrefix - FAIL
Desc: Check subject contains "Bluetooth" prefix
Output:
"Bluetooth: " prefix is not specified in the subject
##############################
Test: CheckKernelLLVM - SKIP
Desc: Build kernel with LLVM + context analysis
Output:
Clang not found
https://github.com/bluez/bluetooth-next/pull/612
---
Regards,
Linux Bluetooth
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
2026-08-19 5:45 [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct Li Jun
2026-08-19 6:28 ` bluez.test.bot
@ 2026-08-21 15:34 ` kernel test robot
2026-08-21 19:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-08-21 15:34 UTC (permalink / raw)
To: Li Jun, marcel, luiz.dentz, linux-bluetooth; +Cc: oe-kbuild-all
Hi Li,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master linus/master v7.2 next-20260820]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Li-Jun/bluetooth-pm-use-SIMPLE_DEV_OPS-for-pm-struct/20260819-134525
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20260819054525.2325031-1-lijun01%40kylinos.cn
patch subject: [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
config: nios2-allmodconfig (https://download.01.org/0day-ci/archive/20260821/202608212327.5HOcOSwg-lkp@intel.com/config)
compiler: nios2-linux-gcc (GCC) 11.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260821/202608212327.5HOcOSwg-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608212327.5HOcOSwg-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/bluetooth/btmrvl_sdio.c:1678:12: warning: 'btmrvl_sdio_resume' defined but not used [-Wunused-function]
1678 | static int btmrvl_sdio_resume(struct device *dev)
| ^~~~~~~~~~~~~~~~~~
>> drivers/bluetooth/btmrvl_sdio.c:1608:12: warning: 'btmrvl_sdio_suspend' defined but not used [-Wunused-function]
1608 | static int btmrvl_sdio_suspend(struct device *dev)
| ^~~~~~~~~~~~~~~~~~~
vim +/btmrvl_sdio_resume +1678 drivers/bluetooth/btmrvl_sdio.c
789221ecc870117 Bing Zhao 2009-06-02 1607
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 @1608 static int btmrvl_sdio_suspend(struct device *dev)
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1609 {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1610 struct sdio_func *func = dev_to_sdio_func(dev);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1611 struct btmrvl_sdio_card *card;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1612 struct btmrvl_private *priv;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1613 mmc_pm_flag_t pm_flags;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1614 struct hci_dev *hcidev;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1615
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1616 if (func) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1617 pm_flags = sdio_get_host_pm_caps(func);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1618 BT_DBG("%s: suspend: PM flags = 0x%x", sdio_func_id(func),
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1619 pm_flags);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1620 if (!(pm_flags & MMC_PM_KEEP_POWER)) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1621 BT_ERR("%s: cannot remain alive while suspended",
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1622 sdio_func_id(func));
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1623 return -ENOSYS;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1624 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1625 card = sdio_get_drvdata(func);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1626 if (!card || !card->priv) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1627 BT_ERR("card or priv structure is not valid");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1628 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1629 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1630 } else {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1631 BT_ERR("sdio_func is not specified");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1632 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1633 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1634
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1635 /* Enable platform specific wakeup interrupt */
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1636 if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0 &&
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1637 device_may_wakeup(dev)) {
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1638 card->plt_wake_cfg->wake_by_bt = false;
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1639 enable_irq(card->plt_wake_cfg->irq_bt);
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1640 enable_irq_wake(card->plt_wake_cfg->irq_bt);
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1641 }
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1642
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1643 priv = card->priv;
8cf60cf238ce1be Chin-Ran Lo 2016-01-06 1644 priv->adapter->is_suspending = true;
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1645 hcidev = priv->btmrvl_dev.hcidev;
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1646 BT_DBG("%s: SDIO suspend", hcidev->name);
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1647 hci_suspend_dev(hcidev);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1648
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1649 if (priv->adapter->hs_state != HS_ACTIVATED) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1650 if (btmrvl_enable_hs(priv)) {
8f91566f99fab8f Colin Ian King 2017-02-18 1651 BT_ERR("HS not activated, suspend failed!");
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1652 /* Disable platform specific wakeup interrupt */
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1653 if (card->plt_wake_cfg &&
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1654 card->plt_wake_cfg->irq_bt >= 0 &&
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1655 device_may_wakeup(dev)) {
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1656 disable_irq_wake(card->plt_wake_cfg->irq_bt);
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1657 disable_irq(card->plt_wake_cfg->irq_bt);
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1658 }
6eb7bd66830c1e1 Xinming Hu 2017-03-31 1659
e7acf43024e95fa Amitkumar Karwar 2016-07-15 1660 priv->adapter->is_suspending = false;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1661 return -EBUSY;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1662 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1663 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1664
8cf60cf238ce1be Chin-Ran Lo 2016-01-06 1665 priv->adapter->is_suspending = false;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1666 priv->adapter->is_suspended = true;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1667
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1668 /* We will keep the power when hs enabled successfully */
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1669 if (priv->adapter->hs_state == HS_ACTIVATED) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1670 BT_DBG("suspend with MMC_PM_KEEP_POWER");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1671 return sdio_set_host_pm_flags(func, MMC_PM_KEEP_POWER);
f1554b7b2c27ced prasanna karthik 2017-03-28 1672 }
f1554b7b2c27ced prasanna karthik 2017-03-28 1673
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1674 BT_DBG("suspend without MMC_PM_KEEP_POWER");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1675 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1676 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1677
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 @1678 static int btmrvl_sdio_resume(struct device *dev)
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1679 {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1680 struct sdio_func *func = dev_to_sdio_func(dev);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1681 struct btmrvl_sdio_card *card;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1682 struct btmrvl_private *priv;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1683 mmc_pm_flag_t pm_flags;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1684 struct hci_dev *hcidev;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1685
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1686 if (func) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1687 pm_flags = sdio_get_host_pm_caps(func);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1688 BT_DBG("%s: resume: PM flags = 0x%x", sdio_func_id(func),
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1689 pm_flags);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1690 card = sdio_get_drvdata(func);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1691 if (!card || !card->priv) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1692 BT_ERR("card or priv structure is not valid");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1693 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1694 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1695 } else {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1696 BT_ERR("sdio_func is not specified");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1697 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1698 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1699 priv = card->priv;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1700
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1701 if (!priv->adapter->is_suspended) {
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1702 BT_DBG("device already resumed");
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1703 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1704 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1705
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1706 priv->hw_wakeup_firmware(priv);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1707 priv->adapter->hs_state = HS_DEACTIVATED;
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1708 hcidev = priv->btmrvl_dev.hcidev;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1709 BT_DBG("%s: HS DEACTIVATED in resume!", hcidev->name);
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1710 priv->adapter->is_suspended = false;
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1711 BT_DBG("%s: SDIO resume", hcidev->name);
5bf8a7481d21a66 Chin-Ran Lo 2014-07-14 1712 hci_resume_dev(hcidev);
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1713
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1714 /* Disable platform specific wakeup interrupt */
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1715 if (card->plt_wake_cfg && card->plt_wake_cfg->irq_bt >= 0 &&
e660b3510eb4b3c Abhishek Pandit-Subedi 2020-06-10 1716 device_may_wakeup(dev)) {
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1717 disable_irq_wake(card->plt_wake_cfg->irq_bt);
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1718 disable_irq(card->plt_wake_cfg->irq_bt);
9af02d86e11dc40 Jeffy Chen 2017-01-23 1719 if (card->plt_wake_cfg->wake_by_bt)
9af02d86e11dc40 Jeffy Chen 2017-01-23 1720 /* Undo our disable, since interrupt handler already
9af02d86e11dc40 Jeffy Chen 2017-01-23 1721 * did this.
9af02d86e11dc40 Jeffy Chen 2017-01-23 1722 */
9af02d86e11dc40 Jeffy Chen 2017-01-23 1723 enable_irq(card->plt_wake_cfg->irq_bt);
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1724 }
bb7f4f0bcee6844 Xinming Hu 2016-04-26 1725
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1726 return 0;
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1727 }
ba54a16ffacfc71 Amitkumar Karwar 2012-04-25 1728
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
2026-08-19 5:45 [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct Li Jun
2026-08-19 6:28 ` bluez.test.bot
2026-08-21 15:34 ` [PATCH] " kernel test robot
@ 2026-08-21 19:49 ` kernel test robot
2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2026-08-21 19:49 UTC (permalink / raw)
To: Li Jun, marcel, luiz.dentz, linux-bluetooth; +Cc: oe-kbuild-all
Hi Li,
kernel test robot noticed the following build warnings:
[auto build test WARNING on bluetooth/master]
[also build test WARNING on bluetooth-next/master linus/master v7.2 next-20260820]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Li-Jun/bluetooth-pm-use-SIMPLE_DEV_OPS-for-pm-struct/20260819-134525
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth.git master
patch link: https://lore.kernel.org/r/20260819054525.2325031-1-lijun01%40kylinos.cn
patch subject: [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct
config: powerpc-randconfig-r123-20260821 (https://download.01.org/0day-ci/archive/20260822/202608220346.df2N3qLw-lkp@intel.com/config)
compiler: clang version 24.0.0git (https://github.com/llvm/llvm-project 935bfc708590c60147a79c7df145bb6e68b1d388)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260822/202608220346.df2N3qLw-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202608220346.df2N3qLw-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/bluetooth/btmrvl_sdio.c:1729:1: sparse: sparse: symbol 'btmrvl_sdio_pm_ops' was not declared. Should it be static?
vim +/btmrvl_sdio_pm_ops +1729 drivers/bluetooth/btmrvl_sdio.c
1728
> 1729 SIMPLE_DEV_PM_OPS(btmrvl_sdio_pm_ops, btmrvl_sdio_suspend, btmrvl_sdio_resume);
1730
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-21 19:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 5:45 [PATCH] bluetooth: pm: use SIMPLE_DEV_OPS for pm struct Li Jun
2026-08-19 6:28 ` bluez.test.bot
2026-08-21 15:34 ` [PATCH] " kernel test robot
2026-08-21 19:49 ` kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox