All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@kernel.org>
To: Marcel Holtmann <marcel@holtmann.org>,
	Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
	Kiran K <kiran.k@intel.com>, Paul Menzel <pmenzel@molgen.mpg.de>,
	Arnd Bergmann <arnd@arndb.de>,
	Chandrashekar Devegowda <chandrashekar.devegowda@intel.com>
Cc: Vijay Satija <vijay.satija@intel.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] Bluetooth: btintel_pcie: fix CONFIG_PM_SLEEP check
Date: Tue, 29 Jul 2025 17:27:40 +0200	[thread overview]
Message-ID: <20250729152743.2394727-1-arnd@kernel.org> (raw)

From: Arnd Bergmann <arnd@arndb.de>

Using both pm_sleep_ptr() and an #ifdef around the definition is not
valid:

In file included from include/linux/kernel.h:36,
                 from drivers/bluetooth/btintel_pcie.c:9:
drivers/bluetooth/btintel_pcie.c:2674:36: error: 'btintel_pcie_pm_ops' undeclared here (not in a function); did you mean 'btintel_pcie_in_op'?
 2674 |         .driver.pm = pm_sleep_ptr(&btintel_pcie_pm_ops),
      |                                    ^~~~~~~~~~~~~~~~~~~

Remove the #ifdef check to let the compiler's dead-code-elimination drop
this as intended by pm_sleep_ptr().

Fixes: d1b3de23042b ("Bluetooth: btintel_pcie: Add support for _suspend() / _resume()")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/bluetooth/btintel_pcie.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/bluetooth/btintel_pcie.c b/drivers/bluetooth/btintel_pcie.c
index 8e65def192a9..aa47bc38d298 100644
--- a/drivers/bluetooth/btintel_pcie.c
+++ b/drivers/bluetooth/btintel_pcie.c
@@ -2574,7 +2574,6 @@ static void btintel_pcie_coredump(struct device *dev)
 }
 #endif
 
-#ifdef CONFIG_PM_SLEEP
 static int btintel_pcie_suspend_late(struct device *dev, pm_message_t mesg)
 {
 	struct pci_dev *pdev = to_pci_dev(dev);
@@ -2664,7 +2663,6 @@ static const struct dev_pm_ops btintel_pcie_pm_ops = {
 	.poweroff = btintel_pcie_hibernate,
 	.restore = btintel_pcie_resume,
 };
-#endif
 
 static struct pci_driver btintel_pcie_driver = {
 	.name = KBUILD_MODNAME,
-- 
2.39.5


             reply	other threads:[~2025-07-29 15:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-29 15:27 Arnd Bergmann [this message]
2025-07-29 16:07 ` Bluetooth: btintel_pcie: fix CONFIG_PM_SLEEP check bluez.test.bot
2025-07-29 18:09 ` [PATCH] " Luiz Augusto von Dentz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250729152743.2394727-1-arnd@kernel.org \
    --to=arnd@kernel.org \
    --cc=arnd@arndb.de \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=kiran.k@intel.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luiz.dentz@gmail.com \
    --cc=marcel@holtmann.org \
    --cc=pmenzel@molgen.mpg.de \
    --cc=vijay.satija@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.