public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: btmtk: hide unused  btmtk_mt6639_devs[] array
@ 2026-04-02 14:11 Arnd Bergmann
  2026-04-02 15:41 ` Paul Menzel
  2026-04-02 17:40 ` patchwork-bot+bluetooth
  0 siblings, 2 replies; 3+ messages in thread
From: Arnd Bergmann @ 2026-04-02 14:11 UTC (permalink / raw)
  To: Marcel Holtmann, Luiz Augusto von Dentz, Matthias Brugger,
	AngeloGioacchino Del Regno, Javier Tia
  Cc: Arnd Bergmann, Chris Lu, Kees Cook, Johan Hovold, Sean Wang,
	Jiande Lu, linux-bluetooth, linux-kernel, linux-arm-kernel,
	linux-mediatek

From: Arnd Bergmann <arnd@arndb.de>

When USB support is disabled, the array is not referenced anywhere,
causing a warning:

drivers/bluetooth/btmtk.c:35:3: error: 'btmtk_mt6639_devs' defined but not used [-Werror=unused-const-variable=]
   35 | } btmtk_mt6639_devs[] = {
      |   ^~~~~~~~~~~~~~~~~

Move it into the #ifdef block.

Fixes: 4cdd001ff03f ("Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
 drivers/bluetooth/btmtk.c | 32 ++++++++++++++++----------------
 1 file changed, 16 insertions(+), 16 deletions(-)

diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
index 099188bf772e..6fb6ca274808 100644
--- a/drivers/bluetooth/btmtk.c
+++ b/drivers/bluetooth/btmtk.c
@@ -25,22 +25,6 @@
 /* It is for mt79xx iso data transmission setting */
 #define MTK_ISO_THRESHOLD	264
 
-/* Known MT6639 (MT7927) Bluetooth USB devices.
- * Used to scope the zero-CHIPID workaround to real MT6639 hardware,
- * since some boards return 0x0000 from the MMIO chip ID register.
- */
-static const struct {
-	u16 vendor;
-	u16 product;
-} btmtk_mt6639_devs[] = {
-	{ 0x0489, 0xe13a },	/* ASUS ROG Crosshair X870E Hero */
-	{ 0x0489, 0xe0fa },	/* Lenovo Legion Pro 7 16ARX9 */
-	{ 0x0489, 0xe10f },	/* Gigabyte Z790 AORUS MASTER X */
-	{ 0x0489, 0xe110 },	/* MSI X870E Ace Max */
-	{ 0x0489, 0xe116 },	/* TP-Link Archer TBE550E */
-	{ 0x13d3, 0x3588 },	/* ASUS ROG STRIX X870E-E */
-};
-
 struct btmtk_patch_header {
 	u8 datetime[16];
 	u8 platform[4];
@@ -483,6 +467,22 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
 EXPORT_SYMBOL_GPL(btmtk_process_coredump);
 
 #if IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK)
+/* Known MT6639 (MT7927) Bluetooth USB devices.
+ * Used to scope the zero-CHIPID workaround to real MT6639 hardware,
+ * since some boards return 0x0000 from the MMIO chip ID register.
+ */
+static const struct {
+	u16 vendor;
+	u16 product;
+} btmtk_mt6639_devs[] = {
+	{ 0x0489, 0xe13a },	/* ASUS ROG Crosshair X870E Hero */
+	{ 0x0489, 0xe0fa },	/* Lenovo Legion Pro 7 16ARX9 */
+	{ 0x0489, 0xe10f },	/* Gigabyte Z790 AORUS MASTER X */
+	{ 0x0489, 0xe110 },	/* MSI X870E Ace Max */
+	{ 0x0489, 0xe116 },	/* TP-Link Archer TBE550E */
+	{ 0x13d3, 0x3588 },	/* ASUS ROG STRIX X870E-E */
+};
+
 static void btmtk_usb_wmt_recv(struct urb *urb)
 {
 	struct hci_dev *hdev = urb->context;
-- 
2.39.5



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array
  2026-04-02 14:11 [PATCH] Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array Arnd Bergmann
@ 2026-04-02 15:41 ` Paul Menzel
  2026-04-02 17:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: Paul Menzel @ 2026-04-02 15:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Marcel Holtmann, Luiz Augusto von Dentz, Matthias Brugger,
	AngeloGioacchino Del Regno, Javier Tia, Arnd Bergmann, Chris Lu,
	Kees Cook, Johan Hovold, Sean Wang, Jiande Lu, linux-bluetooth,
	linux-kernel, linux-arm-kernel, linux-mediatek

Dear Arnd,


Thank you for your patch.

Am 02.04.26 um 16:11 schrieb Arnd Bergmann:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When USB support is disabled, the array is not referenced anywhere,
> causing a warning:
> 
> drivers/bluetooth/btmtk.c:35:3: error: 'btmtk_mt6639_devs' defined but not used [-Werror=unused-const-variable=]
>     35 | } btmtk_mt6639_devs[] = {
>        |   ^~~~~~~~~~~~~~~~~
> 
> Move it into the #ifdef block.
> 
> Fixes: 4cdd001ff03f ("Bluetooth: btmtk: Add MT6639 (MT7927) Bluetooth support")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
>   drivers/bluetooth/btmtk.c | 32 ++++++++++++++++----------------
>   1 file changed, 16 insertions(+), 16 deletions(-)
> 
> diff --git a/drivers/bluetooth/btmtk.c b/drivers/bluetooth/btmtk.c
> index 099188bf772e..6fb6ca274808 100644
> --- a/drivers/bluetooth/btmtk.c
> +++ b/drivers/bluetooth/btmtk.c
> @@ -25,22 +25,6 @@
>   /* It is for mt79xx iso data transmission setting */
>   #define MTK_ISO_THRESHOLD	264
>   
> -/* Known MT6639 (MT7927) Bluetooth USB devices.
> - * Used to scope the zero-CHIPID workaround to real MT6639 hardware,
> - * since some boards return 0x0000 from the MMIO chip ID register.
> - */
> -static const struct {
> -	u16 vendor;
> -	u16 product;
> -} btmtk_mt6639_devs[] = {
> -	{ 0x0489, 0xe13a },	/* ASUS ROG Crosshair X870E Hero */
> -	{ 0x0489, 0xe0fa },	/* Lenovo Legion Pro 7 16ARX9 */
> -	{ 0x0489, 0xe10f },	/* Gigabyte Z790 AORUS MASTER X */
> -	{ 0x0489, 0xe110 },	/* MSI X870E Ace Max */
> -	{ 0x0489, 0xe116 },	/* TP-Link Archer TBE550E */
> -	{ 0x13d3, 0x3588 },	/* ASUS ROG STRIX X870E-E */
> -};
> -
>   struct btmtk_patch_header {
>   	u8 datetime[16];
>   	u8 platform[4];
> @@ -483,6 +467,22 @@ int btmtk_process_coredump(struct hci_dev *hdev, struct sk_buff *skb)
>   EXPORT_SYMBOL_GPL(btmtk_process_coredump);
>   
>   #if IS_ENABLED(CONFIG_BT_HCIBTUSB_MTK)
> +/* Known MT6639 (MT7927) Bluetooth USB devices.
> + * Used to scope the zero-CHIPID workaround to real MT6639 hardware,
> + * since some boards return 0x0000 from the MMIO chip ID register.
> + */
> +static const struct {
> +	u16 vendor;
> +	u16 product;
> +} btmtk_mt6639_devs[] = {
> +	{ 0x0489, 0xe13a },	/* ASUS ROG Crosshair X870E Hero */
> +	{ 0x0489, 0xe0fa },	/* Lenovo Legion Pro 7 16ARX9 */
> +	{ 0x0489, 0xe10f },	/* Gigabyte Z790 AORUS MASTER X */
> +	{ 0x0489, 0xe110 },	/* MSI X870E Ace Max */
> +	{ 0x0489, 0xe116 },	/* TP-Link Archer TBE550E */
> +	{ 0x13d3, 0x3588 },	/* ASUS ROG STRIX X870E-E */
> +};
> +
>   static void btmtk_usb_wmt_recv(struct urb *urb)
>   {
>   	struct hci_dev *hdev = urb->context;

Reviewed-by: Paul Menzel <pmenzel@molgen.mpg.de>


Kind regards,

Paul


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Bluetooth: btmtk: hide unused  btmtk_mt6639_devs[] array
  2026-04-02 14:11 [PATCH] Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array Arnd Bergmann
  2026-04-02 15:41 ` Paul Menzel
@ 2026-04-02 17:40 ` patchwork-bot+bluetooth
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+bluetooth @ 2026-04-02 17:40 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: marcel, luiz.dentz, matthias.bgg, angelogioacchino.delregno,
	floss, arnd, chris.lu, kees, johan, sean.wang, jiande.lu,
	linux-bluetooth, linux-kernel, linux-arm-kernel, linux-mediatek

Hello:

This patch was applied to bluetooth/bluetooth-next.git (master)
by Luiz Augusto von Dentz <luiz.von.dentz@intel.com>:

On Thu,  2 Apr 2026 16:11:15 +0200 you wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> 
> When USB support is disabled, the array is not referenced anywhere,
> causing a warning:
> 
> drivers/bluetooth/btmtk.c:35:3: error: 'btmtk_mt6639_devs' defined but not used [-Werror=unused-const-variable=]
>    35 | } btmtk_mt6639_devs[] = {
>       |   ^~~~~~~~~~~~~~~~~
> 
> [...]

Here is the summary with links:
  - Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array
    https://git.kernel.org/bluetooth/bluetooth-next/c/a6e00a811c87

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html




^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-04-02 17:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-02 14:11 [PATCH] Bluetooth: btmtk: hide unused btmtk_mt6639_devs[] array Arnd Bergmann
2026-04-02 15:41 ` Paul Menzel
2026-04-02 17:40 ` patchwork-bot+bluetooth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox