[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <b78a4255d17adbb74140aa23f89cb7653af96c75.1756513671.git.calvin@wbinvd.org>
Date: Fri, 29 Aug 2025 17:50:29 -0700
From: Calvin Owens <calvin@...nvd.org>
To: linux-kernel@...r.kernel.org
Cc: linux-bluetooth@...r.kernel.org,
Luiz Augusto von Dentz <luiz.von.dentz@...el.com>,
Paul Menzel <pmenzel@...gen.mpg.de>,
oe-kbuild-all@...ts.linux.dev,
Marcel Holtmann <marcel@...tmann.org>,
Sean Wang <sean.wang@...iatek.com>,
linux-mediatek@...ts.infradead.org
Subject: [PATCH] Bluetooth: btmtksdio: Fix build after header cleanup
Syzbot found a randconfig which fails after my recent patch:
drivers/bluetooth/btmtksdio.c:442:33: error: array type has incomplete element type ‘struct h4_recv_pkt’
442 | static const struct h4_recv_pkt mtk_recv_pkts[] = {
| ^~~~~~~~~~~~~
drivers/bluetooth/btmtksdio.c:443:11: error: ‘H4_RECV_ACL’ undeclared here (not in a function)
443 | { H4_RECV_ACL, .recv = btmtksdio_recv_acl },
| ^~~~~~~~~~~
drivers/bluetooth/btmtksdio.c:444:11: error: ‘H4_RECV_SCO’ undeclared here (not in a function)
444 | { H4_RECV_SCO, .recv = hci_recv_frame },
| ^~~~~~~~~~~
drivers/bluetooth/btmtksdio.c:445:11: error: ‘H4_RECV_EVENT’ undeclared here (not in a function)
445 | { H4_RECV_EVENT, .recv = btmtksdio_recv_event },
...because we can have BT_MTKSDIO=y with BT_HCIUART_H4=n, and the
definitions used here are gated on BT_HCIUART_H4 in hci_uart.h.
I think the simplest way to fix this is to remove the gate on the
definitions in hci_uart.h. Since the constants are macros, there's no
runtime cost to doing so, and nothing seems to rely on their absence in
the BT_HCIUART_H4=n case.
I let randconfig builds run for awhile in drivers/bluetooth/ and didn't
hit anything else, so hopefully this was the only fallout.
Fixes: 74bcec450eea ("Bluetooth: remove duplicate h4_recv_buf() in header")
Reported-by: kernel test robot <lkp@...el.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202508300413.OnIedvRh-lkp@intel.com/
Signed-off-by: Calvin Owens <calvin@...nvd.org>
---
drivers/bluetooth/hci_uart.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/bluetooth/hci_uart.h b/drivers/bluetooth/hci_uart.h
index 5ea5dd80e297..fd0624988aba 100644
--- a/drivers/bluetooth/hci_uart.h
+++ b/drivers/bluetooth/hci_uart.h
@@ -121,7 +121,6 @@ void hci_uart_set_flow_control(struct hci_uart *hu, bool enable);
void hci_uart_set_speeds(struct hci_uart *hu, unsigned int init_speed,
unsigned int oper_speed);
-#ifdef CONFIG_BT_HCIUART_H4
int h4_init(void);
int h4_deinit(void);
@@ -165,7 +164,6 @@ struct h4_recv_pkt {
struct sk_buff *h4_recv_buf(struct hci_dev *hdev, struct sk_buff *skb,
const unsigned char *buffer, int count,
const struct h4_recv_pkt *pkts, int pkts_count);
-#endif
#ifdef CONFIG_BT_HCIUART_BCSP
int bcsp_init(void);
--
2.49.1
Powered by blists - more mailing lists