Re: [PATCH] RFC: Bluetooth: missed cpu_to_le16 conversion in hci_init4_req

2019-10-17 Thread Simon Horman
On Wed, Oct 16, 2019 at 08:42:48PM +0200, Marcel Holtmann wrote: > Hi Simon, > > >> It looks like in hci_init4_req() the request is being > >> initialised from cpu-endian data but the packet is specified > >> to be little-endian. This causes an warning from sparse due > >> to __le16 to u16

Re: [PATCH] RFC: Bluetooth: missed cpu_to_le16 conversion in hci_init4_req

2019-10-16 Thread Marcel Holtmann
Hi Simon, >> It looks like in hci_init4_req() the request is being >> initialised from cpu-endian data but the packet is specified >> to be little-endian. This causes an warning from sparse due >> to __le16 to u16 conversion. >> >> Fix this by using cpu_to_le16() on the two fields in the packet.

Re: [PATCH] RFC: Bluetooth: missed cpu_to_le16 conversion in hci_init4_req

2019-10-16 Thread Marcel Holtmann
Hi Ben, > It looks like in hci_init4_req() the request is being > initialised from cpu-endian data but the packet is specified > to be little-endian. This causes an warning from sparse due > to __le16 to u16 conversion. > > Fix this by using cpu_to_le16() on the two fields in the packet. > >

Re: [PATCH] RFC: Bluetooth: missed cpu_to_le16 conversion in hci_init4_req

2019-10-16 Thread Simon Horman
On Wed, Oct 16, 2019 at 12:39:43PM +0100, Ben Dooks (Codethink) wrote: > It looks like in hci_init4_req() the request is being > initialised from cpu-endian data but the packet is specified > to be little-endian. This causes an warning from sparse due > to __le16 to u16 conversion. > > Fix this

[PATCH] RFC: Bluetooth: missed cpu_to_le16 conversion in hci_init4_req

2019-10-16 Thread Ben Dooks (Codethink)
It looks like in hci_init4_req() the request is being initialised from cpu-endian data but the packet is specified to be little-endian. This causes an warning from sparse due to __le16 to u16 conversion. Fix this by using cpu_to_le16() on the two fields in the packet.