]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Bluetooth: hci: Remove deadcode
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 16 Dec 2024 01:26:36 +0000 (01:26 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 15 Jan 2025 15:32:20 +0000 (10:32 -0500)
hci_bdaddr_list_del_with_flags() was added in 2020's
commit 8baaa4038edb ("Bluetooth: Add bdaddr_list_with_flags for classic
whitelist")
but has remained unused.

hci_remove_ext_adv_instance() was added in 2020's
commit eca0ae4aea66 ("Bluetooth: Add initial implementation of BIS
connections")
but has remained unused.

Remove them.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h
include/net/bluetooth/hci_sync.h
net/bluetooth/hci_core.c
net/bluetooth/hci_sync.c

index 734cd50cdc465ca68873d966f47ec43c49b7f52d..84b522a10019218a64b40f2865580625fefde31f 100644 (file)
@@ -1760,8 +1760,6 @@ int hci_bdaddr_list_add_with_flags(struct list_head *list, bdaddr_t *bdaddr,
 int hci_bdaddr_list_del(struct list_head *list, bdaddr_t *bdaddr, u8 type);
 int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,
                                 u8 type);
-int hci_bdaddr_list_del_with_flags(struct list_head *list, bdaddr_t *bdaddr,
-                                  u8 type);
 void hci_bdaddr_list_clear(struct list_head *list);
 
 struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
index f3052cb252efddf2358fb0038d0201bcf11fb848..7e2cf0cca939a1ff5234458941d55ec50ea9c089 100644 (file)
@@ -140,7 +140,6 @@ int hci_update_scan(struct hci_dev *hdev);
 int hci_write_le_host_supported_sync(struct hci_dev *hdev, u8 le, u8 simul);
 int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
                                     struct sock *sk);
-int hci_remove_ext_adv_instance(struct hci_dev *hdev, u8 instance);
 struct sk_buff *hci_read_local_oob_data_sync(struct hci_dev *hdev, bool ext,
                                             struct sock *sk);
 
index 18ab5628f85adcd74e9d35f74d6b2bc118a2cd6d..ba955447b359ee8bd05061b77110c5b96aaf6b73 100644 (file)
@@ -2181,26 +2181,6 @@ int hci_bdaddr_list_del_with_irk(struct list_head *list, bdaddr_t *bdaddr,
        return 0;
 }
 
-int hci_bdaddr_list_del_with_flags(struct list_head *list, bdaddr_t *bdaddr,
-                                  u8 type)
-{
-       struct bdaddr_list_with_flags *entry;
-
-       if (!bacmp(bdaddr, BDADDR_ANY)) {
-               hci_bdaddr_list_clear(list);
-               return 0;
-       }
-
-       entry = hci_bdaddr_list_lookup_with_flags(list, bdaddr, type);
-       if (!entry)
-               return -ENOENT;
-
-       list_del(&entry->list);
-       kfree(entry);
-
-       return 0;
-}
-
 /* This function requires the caller holds hdev->lock */
 struct hci_conn_params *hci_conn_params_lookup(struct hci_dev *hdev,
                                               bdaddr_t *addr, u8 addr_type)
index 0badec7120ab3343a8e1e1647750a863f8248dcb..dd770ef5ec36840add2fa0549aa1689135a21e4c 100644 (file)
@@ -1786,30 +1786,6 @@ int hci_remove_ext_adv_instance_sync(struct hci_dev *hdev, u8 instance,
                                        HCI_CMD_TIMEOUT, sk);
 }
 
-static int remove_ext_adv_sync(struct hci_dev *hdev, void *data)
-{
-       struct adv_info *adv = data;
-       u8 instance = 0;
-
-       if (adv)
-               instance = adv->instance;
-
-       return hci_remove_ext_adv_instance_sync(hdev, instance, NULL);
-}
-
-int hci_remove_ext_adv_instance(struct hci_dev *hdev, u8 instance)
-{
-       struct adv_info *adv = NULL;
-
-       if (instance) {
-               adv = hci_find_adv_instance(hdev, instance);
-               if (!adv)
-                       return -EINVAL;
-       }
-
-       return hci_cmd_sync_queue(hdev, remove_ext_adv_sync, adv, NULL);
-}
-
 int hci_le_terminate_big_sync(struct hci_dev *hdev, u8 handle, u8 reason)
 {
        struct hci_cp_le_term_big cp;