• B
    Bluetooth: missed cpu_to_le16 conversion in hci_init4_req · 727ea61a
    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.
    
    net/bluetooth/hci_core.c:845:27: warning: incorrect type in assignment (different base types)
    net/bluetooth/hci_core.c:845:27:    expected restricted __le16 [usertype] tx_len
    net/bluetooth/hci_core.c:845:27:    got unsigned short [usertype] le_max_tx_len
    net/bluetooth/hci_core.c:846:28: warning: incorrect type in assignment (different base types)
    net/bluetooth/hci_core.c:846:28:    expected restricted __le16 [usertype] tx_time
    net/bluetooth/hci_core.c:846:28:    got unsigned short [usertype] le_max_tx_time
    Signed-off-by: NBen Dooks <ben.dooks@codethink.co.uk>
    Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
    727ea61a
hci_core.c 107.1 KB