Skip to content

Commit b05ce88

Browse files
Dr. David Alan GilbertVudentz
authored andcommitted
Bluetooth: hci: Remove deadcode
hci_bdaddr_list_del_with_flags() was added in 2020's commit 8baaa40 ("Bluetooth: Add bdaddr_list_with_flags for classic whitelist") but has remained unused. hci_remove_ext_adv_instance() was added in 2020's commit eca0ae4 ("Bluetooth: Add initial implementation of BIS connections") but has remained unused. Remove them. Signed-off-by: Dr. David Alan Gilbert <[email protected]> Signed-off-by: Luiz Augusto von Dentz <[email protected]>
1 parent e209e5c commit b05ce88

File tree

4 files changed

+0
-47
lines changed

4 files changed

+0
-47
lines changed

include/net/bluetooth/hci_core.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1760,8 +1760,6 @@ int hci_bdaddr_list_add_with_flags(struct list_head *list, bdaddr_t *bdaddr,
17601760
int hci_bdaddr_list_del(struct list_head *list, bdaddr_t *bdaddr, u8 type);
17611761
int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,
17621762
u8 type);
1763-
int hci_bdaddr_list_del_with_flags(struct list_head *list, bdaddr_t *bdaddr,
1764-
u8 type);
17651763
void hci_bdaddr_list_clear(struct list_head *list);
17661764

17671765
struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,

include/net/bluetooth/hci_sync.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,6 @@ int hci_update_scan(struct hci_dev *hdev);
140140
int hci_write_le_host_supported_sync(struct hci_dev *hdev, u8 le, u8 simul);
141141
int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
142142
struct sock *sk);
143-
int hci_remove_ext_adv_instance(struct hci_dev *hdev, u8 instance);
144143
struct sk_buff *hci_read_local_oob_data_sync(struct hci_dev *hdev, bool ext,
145144
struct sock *sk);
146145

net/bluetooth/hci_core.c

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2181,26 +2181,6 @@ int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,
21812181
return 0;
21822182
}
21832183

2184-
int hci_bdaddr_list_del_with_flags(struct list_head *list, bdaddr_t *bdaddr,
2185-
u8 type)
2186-
{
2187-
struct bdaddr_list_with_flags *entry;
2188-
2189-
if (!bacmp(bdaddr, BDADDR_ANY)) {
2190-
hci_bdaddr_list_clear(list);
2191-
return 0;
2192-
}
2193-
2194-
entry = hci_bdaddr_list_lookup_with_flags(list, bdaddr, type);
2195-
if (!entry)
2196-
return -ENOENT;
2197-
2198-
list_del(&entry->list);
2199-
kfree(entry);
2200-
2201-
return 0;
2202-
}
2203-
22042184
/* This function requires the caller holds hdev->lock */
22052185
struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
22062186
bdaddr_t *addr, u8 addr_type)

net/bluetooth/hci_sync.c

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1786,30 +1786,6 @@ int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
17861786
HCI_CMD_TIMEOUT, sk);
17871787
}
17881788

1789-
static int remove_ext_adv_sync(struct hci_dev *hdev, void *data)
1790-
{
1791-
struct adv_info *adv = data;
1792-
u8 instance = 0;
1793-
1794-
if (adv)
1795-
instance = adv->instance;
1796-
1797-
return hci_remove_ext_adv_instance_sync(hdev, instance, NULL);
1798-
}
1799-
1800-
int hci_remove_ext_adv_instance(struct hci_dev *hdev, u8 instance)
1801-
{
1802-
struct adv_info *adv = NULL;
1803-
1804-
if (instance) {
1805-
adv = hci_find_adv_instance(hdev, instance);
1806-
if (!adv)
1807-
return -EINVAL;
1808-
}
1809-
1810-
return hci_cmd_sync_queue(hdev, remove_ext_adv_sync, adv, NULL);
1811-
}
1812-
18131789
int hci_le_terminate_big_sync(struct hci_dev *hdev, u8 handle, u8 reason)
18141790
{
18151791
struct hci_cp_le_term_big cp;

0 commit comments

Comments
 (0)