From: Kyle Pepper <cochcoder@proton.me>
To: linux-bluetooth@vger.kernel.org
Cc: Marcel Holtmann <marcel@holtmann.org>,
Luiz Augusto von Dentz <luiz.dentz@gmail.com>,
linux-kernel@vger.kernel.org
Subject: [PATCH] Bluetooth: hci: Represent advertising report payloads as bytes
Date: Wed, 14 Oct 2026 05:22:58 +0000 [thread overview]
Message-ID: <20261014052244.416087-1-cochcoder@proton.me> (raw)
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
next reply other threads:[~2026-10-14 5:23 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-14 5:22 Kyle Pepper [this message]
2026-10-14 6:59 ` Bluetooth: hci: Represent advertising report payloads as bytes bluez.test.bot
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=20261014052244.416087-1-cochcoder@proton.me \
--to=cochcoder@proton.me \
--cc=linux-bluetooth@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=luiz.dentz@gmail.com \
--cc=marcel@holtmann.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox