Bluetooth: Move eir_get_length() function into hci_event.c
Subsystems (2)
Marcel Holtmann
maintainerPATCH 1/1 Bluetooth: Move eir_get_length() function into hci_event.c
The eir_get_length() function is only used from hci_event.c and so instead of having a public function move it to the location where it is used.
Signed-off-by Marcel Holtmann <[email protected]>
--- include/net/bluetooth/hci_core.h | 17 ----------------- net/bluetooth/hci_event.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-)
include/net/bluetooth/hci_core.h +0 -17
@@ -1009,23 +1009,6 @@ static inline bool eir_has_data_type(u8 *data, size_t data_len, u8 type)return false; } -static inline size_t eir_get_length (u8 *eir,size_t eir_len) -{ -size_t parsed =0 ; - -while (parsed < eir_len) { -u8 field_len = eir[0 ]; - -if (field_len ==0 ) -return parsed; - - parsed += field_len +1 ; - eir += field_len +1 ; - } - -return eir_len; -} -int hci_register_cb (struct hci_cb *hcb);int hci_unregister_cb (struct hci_cb *hcb);
net/bluetooth/hci_event.c +17 -0
@@ -2928,6 +2928,23 @@ unlock:hci_dev_unlock (hdev); } +static inline size_t eir_get_length (u8 *eir,size_t eir_len) +{ +size_t parsed =0 ; + +while (parsed < eir_len) { +u8 field_len = eir[0 ]; + +if (field_len ==0 ) +return parsed; + + parsed += field_len +1 ; + eir += field_len +1 ; + } + +return eir_len; +} +static void hci_extended_inquiry_result_evt (struct hci_dev *hdev,struct sk_buff *skb) {
Signature · 1 line
1.8.3.1
Johan Hedberg
AppliedHi Marcel,
Quoted 9 lines · Marcel Holtmann
The
eir_get_length()function is only used fromhci_event.cand so instead of having a public function move it to the location where it is used.Signed-off-by Marcel Holtmann <[email protected]>--- include/net/bluetooth/hci_core.h | 17 ----------------- net/bluetooth/hci_event.c | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 17 deletions(-)
Applied to bluetooth-next. Thanks.
Johan