Skip to contentSkip to conversation

Bluetooth: btintel_pci: Fix build warning

PATCH Applied Luiz Augusto von Dentz 3 participants 3 messages Mar 6, 2025 – Mar 7, 2025 Bluetooth drivers

lore
Share & tools
lore

Luiz Augusto von Dentz

author maintainer
#0 lore raw

PATCH 1/1 Bluetooth: btintel_pci: Fix build warning

From: Luiz Augusto von Dentz <[email protected]>

This fixes the following warning:

drivers/bluetooth/btintel_pcie.c:695:20: warning: unused function 'btintel_pcie_in_rom' [-Wunused-function]
695 | static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)

      |                    ^~~~~~~~~~~~~~~~~~~
---
 drivers/bluetooth/btintel_pcie.c | 14 --------------
 1 file changed, 14 deletions(-)
drivers/bluetooth/btintel_pcie.c +0 -14
index f3ab5b41b050..9114be1fc3ce 100644
@@ -685,20 +685,6 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
 	return 0;
 }
 
-/* BIT(0) - ROM, BIT(1) - IML and BIT(3) - OP
- * Sometimes during firmware image switching from ROM to IML or IML to OP image,
- * the previous image bit is not cleared by firmware when alive interrupt is
- * received. Driver needs to take care of these sticky bits when deciding the
- * current image running on controller.
- * Ex: 0x10 and 0x11 - both represents that controller is running IML
- */
-static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)
-{
-	return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ROM &&
-		!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_IML) &&
-		!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW);
-}
-
 static inline bool btintel_pcie_in_op(struct btintel_pcie_data *data)
 {
 	return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW;
Signature · 1 line
2.48.1
Reviewed-by on v1 1/1
#1 lore raw

Dear Luiz,

Thank you for your patch. Maybe be more specific in the summary/title. Maybe:

Bluetooth: btintel_pci: Remove unused btintel_pcie_in_rom()

Am 06.03.25 um 22:38 schrieb Luiz Augusto von Dentz:

Quoted 28 lines

From: Luiz Augusto von Dentz <[email protected]>

This fixes the following warning:

drivers/bluetooth/btintel_pcie.c:695:20: warning: unused function 'btintel_pcie_in_rom' [-Wunused-function]
695 | static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)

       |                    ^~~~~~~~~~~~~~~~~~~
---
  drivers/bluetooth/btintel_pcie.c | 14 --------------
  1 file changed, 14 deletions(-)
drivers/bluetooth/btintel_pcie.c +0 -7
index f3ab5b41b050..9114be1fc3ce 100644
@@ -685,20 +685,6 @@ static int btintel_pcie_enable_bt(struct btintel_pcie_data *data)
  	return 0;
  }
 
-/* BIT(0) - ROM, BIT(1) - IML and BIT(3) - OP
- * Sometimes during firmware image switching from ROM to IML or IML to OP image,
- * the previous image bit is not cleared by firmware when alive interrupt is
- * received. Driver needs to take care of these sticky bits when deciding the
- * current image running on controller.
- * Ex: 0x10 and 0x11 - both represents that controller is running IML
- */

drivers/bluetooth/btintel_pcie.c static int btintel_pcie_enable_bt(struct btintel_pcie_data *data) · line 690

Quoted 10 lines
drivers/bluetooth/btintel_pcie.c +0 -7
-static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)
-{
-	return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_ROM &&
-		!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_IML) &&
-		!(data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW);
-}
-
  static inline bool btintel_pcie_in_op(struct btintel_pcie_data *data)
  {
  	return data->boot_stage_cache & BTINTEL_PCIE_CSR_BOOT_STAGE_OPFW;

Kind regards,

Paul

#2 lore raw
In reply to Luiz Augusto von Dentz
This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master) by Luiz Augusto von Dentz <[email protected]>:

Quoted 9 lines · On Thu, 6 Mar 2025 16:38:46 -0500 you wrote:

From: Luiz Augusto von Dentz <[email protected]>

This fixes the following warning:

drivers/bluetooth/btintel_pcie.c:695:20: warning: unused function 'btintel_pcie_in_rom' [-Wunused-function]
695 | static inline bool btintel_pcie_in_rom(struct btintel_pcie_data *data)

      |                    ^~~~~~~~~~~~~~~~~~~

[...]

Here is the summary with links:
- [v1] Bluetooth: btintel_pci: Fix build warning
https://git.kernel.org/bluetooth/bluetooth-next/c/dfa48dfca48e

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html