]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
Bluetooth: Remove hci_conn_hash_lookup_state()
authorYue Haibing <yuehaibing@huawei.com>
Fri, 20 Jun 2025 07:03:45 +0000 (15:03 +0800)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Wed, 23 Jul 2025 14:24:41 +0000 (10:24 -0400)
Since commit 4aa42119d971 ("Bluetooth: Remove pending ACL connection
attempts") this function is unused.

Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
include/net/bluetooth/hci_core.h

index f79f59e67114b3b50e4ca8919f7ca9f146c43a37..69f491399dac18c17de8fdc029f4fc307fc9b2f0 100644 (file)
@@ -1420,26 +1420,6 @@ hci_conn_hash_lookup_pa_sync_handle(struct hci_dev *hdev, __u16 sync_handle)
        return NULL;
 }
 
-static inline struct hci_conn *hci_conn_hash_lookup_state(struct hci_dev *hdev,
-                                                       __u8 type, __u16 state)
-{
-       struct hci_conn_hash *h = &hdev->conn_hash;
-       struct hci_conn  *c;
-
-       rcu_read_lock();
-
-       list_for_each_entry_rcu(c, &h->list, list) {
-               if (c->type == type && c->state == state) {
-                       rcu_read_unlock();
-                       return c;
-               }
-       }
-
-       rcu_read_unlock();
-
-       return NULL;
-}
-
 typedef void (*hci_conn_func_t)(struct hci_conn *conn, void *data);
 static inline void hci_conn_hash_list_state(struct hci_dev *hdev,
                                            hci_conn_func_t func, __u8 type,