Re: [PATCH] Bluetooth: hci: Represent advertising report payloads as bytes

From: cochcoder

Date: Thu Oct 29 2026 - 08:57:24 EST


I'm withdrawing this patch since v3 of the UB500 patch at https://lore.kernel.org/linux-bluetooth/20261029023235.1280321-2-cochcoder@xxxxxxxxx/ is no longer producing any warnings.



On Wednesday, October 28th, 2026 at 10:05 AM, cochcoder <cochcoder@xxxxxxxxx> wrote:

> Just checking in on this patch. Is there anything else I can do to help it move forward?
>
>
>
> On Wednesday, October 14th, 2026 at 1:22 AM, Kyle Pepper <cochcoder@xxxxxxxxx> wrote:
>
> > 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@xxxxxxxxx>
> > ---
> > 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
> >