Re: [PATCH][next] Bluetooth: hci_event: Use struct_size() helper

2019-02-18 Thread Marcel Holtmann
Hi Gustavo, > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, change the following form: > > sizeof(*ev) + ev->num_hndl * sizeof(struct

Re: [PATCH][next] Bluetooth: hci_event: Use struct_size() helper

2019-02-07 Thread Joe Perches
On Thu, 2019-02-07 at 18:40 -0600, Gustavo A. R. Silva wrote: > Make use of the struct_size() helper instead of an open-coded version > in order to avoid any potential type mistakes, in particular in the > context in which this code is being used. > > So, change the following form: > >

[PATCH][next] Bluetooth: hci_event: Use struct_size() helper

2019-02-07 Thread Gustavo A. R. Silva
Make use of the struct_size() helper instead of an open-coded version in order to avoid any potential type mistakes, in particular in the context in which this code is being used. So, change the following form: sizeof(*ev) + ev->num_hndl * sizeof(struct hci_comp_pkts_info) to :