]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
Bluetooth: MGMT: Remove unused mgmt_pending_find_data
authorDr. David Alan Gilbert <linux@treblig.org>
Mon, 27 Jan 2025 21:37:15 +0000 (21:37 +0000)
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>
Tue, 25 Mar 2025 16:30:43 +0000 (12:30 -0400)
mgmt_pending_find_data() last use was removed in 2021 by
commit 5a7501374664 ("Bluetooth: hci_sync: Convert MGMT_OP_GET_CLOCK_INFO")

Remove it.

Signed-off-by: Dr. David Alan Gilbert <linux@treblig.org>
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
net/bluetooth/mgmt_util.c
net/bluetooth/mgmt_util.h

index 17ab909a7c07f07fa9659eec76a777f514c2a29a..e5ff65e424b5b4c727ed11012ccc1d98f79859d6 100644 (file)
@@ -229,23 +229,6 @@ struct mgmt_pending_cmd *mgmt_pending_find(unsigned short channel, u16 opcode,
        return NULL;
 }
 
-struct mgmt_pending_cmd *mgmt_pending_find_data(unsigned short channel,
-                                               u16 opcode,
-                                               struct hci_dev *hdev,
-                                               const void *data)
-{
-       struct mgmt_pending_cmd *cmd;
-
-       list_for_each_entry(cmd, &hdev->mgmt_pending, list) {
-               if (cmd->user_data != data)
-                       continue;
-               if (cmd->opcode == opcode)
-                       return cmd;
-       }
-
-       return NULL;
-}
-
 void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
                          void (*cb)(struct mgmt_pending_cmd *cmd, void *data),
                          void *data)
index bdf978605d5a85bcbee1c0db1a76065e31a6096e..f2ba994ab1d84766ff0a2a44f8bb2557d20926ca 100644 (file)
@@ -54,10 +54,6 @@ int mgmt_cmd_complete(struct sock *sk, u16 index, u16 cmd, u8 status,
 
 struct mgmt_pending_cmd *mgmt_pending_find(unsigned short channel, u16 opcode,
                                           struct hci_dev *hdev);
-struct mgmt_pending_cmd *mgmt_pending_find_data(unsigned short channel,
-                                               u16 opcode,
-                                               struct hci_dev *hdev,
-                                               const void *data);
 void mgmt_pending_foreach(u16 opcode, struct hci_dev *hdev,
                          void (*cb)(struct mgmt_pending_cmd *cmd, void *data),
                          void *data);