Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Bluetooth: hci: Represent advertising report payloads as bytes
@ 2026-10-14  5:22 Kyle Pepper
  2026-10-14  6:59 ` bluez.test.bot
  0 siblings, 1 reply; 2+ messages in thread
From: Kyle Pepper @ 2026-10-14  5:22 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Marcel Holtmann, Luiz Augusto von Dentz, linux-kernel

Advertising records have variable-length data and cannot form a C
array of flexible structures. Describe the report payloads as bytes
to avoid Sparse warnings without changing their wire layout.

Assisted-by: OpenCode:gpt-6.1-sol sparse
Signed-off-by: Kyle Pepper <cochcoder@proton.me>
---
Separate cleanup of warnings inherited from upstream, not a v2 of the
UB500 shared-buffer RFC. The same two "array of flexible structures"
warnings reproduce on that RFC's parent and exact submitted commit.
The public bot report only contains the matching include-file note;
its complete Sparse output was not available.

Testing:
- GCC W=1 C=2: hci_event.o and btusb_main.o, no diagnostics after cleanup.
- Exact submitted UB500 commit plus this cleanup: same clean checks.
- Strict GCC/Clang layout checks and LLVM/32-bit hci_event.o builds pass.
- GCC hci_event .text section is byte-identical before/after cleanup.
- A guest carrying the cleanup passes pairing and both HoG variants
  on baseline BlueZ and each of four independent ASHA topics: 15/15.

This does not change the UB500 quirk or certify an unseen complete
remote Sparse report. No full architecture/configuration build matrix
or physical hearing-aid regression test is claimed.

 include/net/bluetooth/hci.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/bluetooth/hci.h b/include/net/bluetooth/hci.h
index 1641d879d..e873ffc15 100644
--- a/include/net/bluetooth/hci.h
+++ b/include/net/bluetooth/hci.h
@@ -2972,7 +2972,7 @@ struct hci_ev_le_advertising_info {
 
 struct hci_ev_le_advertising_report {
 	__u8    num;
-	struct hci_ev_le_advertising_info info[];
+	__u8    data[];
 } __packed;
 
 #define HCI_EV_LE_CONN_UPDATE_COMPLETE	0x03
@@ -3058,7 +3058,7 @@ struct hci_ev_le_ext_adv_info {
 
 struct hci_ev_le_ext_adv_report {
 	__u8     num;
-	struct hci_ev_le_ext_adv_info info[];
+	__u8     data[];
 } __packed;
 
 #define HCI_EV_LE_PA_SYNC_ESTABLISHED	0x0e

base-commit: 609a23989d637e2f90522a37c62e65c8c9b8b0ff


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

end of thread, other threads:[~2026-10-14  6:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-14  5:22 [PATCH] Bluetooth: hci: Represent advertising report payloads as bytes Kyle Pepper
2026-10-14  6:59 ` bluez.test.bot

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